InterviewStack.io LogoInterviewStack.io

Scalability Patterns and Techniques Questions

Practical scaling techniques and patterns for application and data layers. Topics include horizontal and vertical scaling strategies and the trade offs of each; caching topologies and strategies such as cache aside write through and write behind and approaches to cache invalidation and consistency; database scaling techniques including read replicas partitioning and sharding and rebalancing strategies; load balancing algorithms including round robin least connections consistent hashing and strategies for sticky sessions and service discovery; message queue and event streaming patterns for decoupling backpressure and asynchronous processing; content distribution using content delivery networks; connection pooling and resource management; rate limiting throttling retry strategies and approaches to avoid thundering herd problems; and how to combine patterns effectively given workload characteristics and operational constraints. Interviewers expect candidates to explain interactions between patterns and the operational pitfalls of each technique.

HardTechnical
25 practiced
You are investigating data corruption in an order service caused by cache invalidation races: concurrent writes and cache updates produced stale or missing order state. Perform a root-cause analysis listing likely race conditions (lost-updates, read-after-write), and propose fixes including write-through caching, versioned objects / optimistic compare-and-swap, single-flight cache refresh, or moving to an append-only event store. Explain pros/cons for each fix and a safe rollout plan.
HardTechnical
26 practiced
Provide a comprehensive design for mitigating thundering herd problems across a globally-distributed cache and service fleet. Include preventative techniques (randomized TTLs, staggered renewals), reactive techniques (request coalescing/singleflight, leader-based warmers, circuit breakers, rate-limits), connection pooling and DB limits, and monitoring/alerting. Discuss implementation details, failure cases, and trade-offs between complexity and protection.
EasyTechnical
31 practiced
Explain eventual consistency versus strong consistency in distributed systems. Provide concrete backend service examples where each model is appropriate (e.g., profiles, shopping carts, payments), discuss trade-offs (latency vs correctness), and describe techniques used to reason about correctness under eventual consistency such as vector clocks, version numbers, read-repair, and bounded staleness.
HardSystem Design
25 practiced
Design service discovery and global load-balancing for a multi-region microservice deployment. Requirements: fast failover between regions, supported health checks, minimal DNS propagation issues, and robustness to partial WAN failures. Consider DNS TTLs, Anycast, global LBs (GSLB), service mesh, client-side discovery, and trade-offs between control-plane complexity and operational reliability.
HardSystem Design
25 practiced
Design a sharding and rebalancing strategy for a multi-tenant user database with tenants that vary by orders of magnitude. Explain shard key selection, the mapping layer (lookup vs algorithmic), online rebalancing (split and merge), minimizing downtime, handling cross-shard transactions, data migration steps, and instrumentation to detect imbalance and trigger rebalancing.

Unlock Full Question Bank

Get access to hundreds of Scalability Patterns and Techniques interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.