Engineering Decisions
The trade-offs a senior interview is really testing
Not “what is a message queue?” — which one, and why. Each guide leads with the verdict you can say out loud, then the framework to reason there, the trade-off table, and the exact follow-up a Staff interviewer asks next.
Data & Storage
SQL vs NoSQL
Default to relational (Postgres). Reach for NoSQL only when a specific access pattern or scale requirement makes relational a poor fit.
Strong vs Eventual Consistency
Strong consistency when correctness needs every reader to see the latest write (money, inventory, uniqueness); eventual when availability and scale matter more and brief staleness is tolerable (feeds, counts, caches).
Replication vs Sharding
Scale reads first with read replicas; split by feature (functional partitioning) when parts of the schema have different load; shard (horizontal partitioning) only when a single primary can't handle the writes or dataset. Exhaust caching and replicas before sharding.
APIs & Communication
Messaging & Streaming
Architecture & Scale
Monolith vs Microservices
Start with a modular monolith. Move to microservices only for a concrete driver — independent scaling, team autonomy, or fault isolation — and only with the ops maturity to run a distributed system.
Synchronous vs Asynchronous Communication
Synchronous when the caller needs an immediate answer to proceed; asynchronous messaging to decouple services, absorb load, tolerate downstream failure, or fan out — at the cost of eventual consistency and more moving parts.
SSR vs CSR vs SSG
SSG for content that's the same for everyone and changes rarely; SSR for personalized or always-fresh pages that still need SEO/fast first paint; CSR for interactive, behind-login app shells. Decide per route, not per app.