MSMuhammad Shahid

Engineering notes

Engineering articles

What I learned building backends and AI systems for products with millions of users: the problems, the fixes and the trade-offs, with code you can reuse.

How we kept a backend fast at 300M+ users: indexes, Redis and RPC failover

How the DOP backend stayed fast at 300M+ users: slow MongoDB queries, compound indexes, Redis caching for read-heavy routes and RPC failover.

·5 min read

Read article →

Scaling a Node.js API from 200K to 1M users with 60% faster responses

How the CV Maker backend grew from 200K to 1M+ users with about 60% faster APIs: MongoDB indexes, aggregation, response caching and pagination.

·4 min read

Read article →

How I built a WhatsApp and Telegram AI support bot with Claude in under 400 lines

How I built an open-source WhatsApp and Telegram AI support bot in Node.js: answers from your docs with Claude, saves leads, hands chats to a person.

·4 min read

Read article →

Why users get logged out at random, and how to fix JWT session bugs

Why users get logged out at random with JWT sessions, and how to fix it: refresh races between tabs, clock skew, cookie settings and server secrets.

·4 min read

Read article →

Building AI agents with LangGraph and n8n: what works in production

Taking AI agents to production: when to use n8n, LangGraph or plain code, validating tool calls, evaluating before release, and keeping cost and latency down.

·4 min read

Read article →