17 topics
Design to Scale
Grow an architecture one bottleneck at a time. Every stage shows what breaks, what fixes it and what the fix costs.
Compute & traffic
Vertical vs Horizontal Scaling
Grow a web application from one server to a fleet: what breaks at each step, why scaling up hits a ceiling, why scaling out needs stateless instances, and where the next bottleneck appears.
ScaleLoad Balancing
Spread requests across instances so none is overloaded — and see how the choice of algorithm and health checks decides your tail latency when instances are not identical.
ScaleStateless Application Design
Keep no user state in the memory of an application instance, so any instance can serve any request — the precondition for load balancing, autoscaling and painless deploys.
ScaleAutoscaling
Add instances when load rises and remove them when it falls — and learn why warm-up time, step size, cooldowns and the choice of metric decide whether autoscaling saves you or flaps.
ScaleCapacity Planning
Estimate how much capacity you need before users find out for you: utilisation, queueing and Little's law explain why latency explodes near 100% and how much headroom to keep.
ScaleCaching
Caching Strategies
Put a cache in front of a struggling database: how cache-aside works, what drives the hit ratio, how to keep data fresh, and how to survive the moment the cache goes cold.
ScaleCache Invalidation
Decide how cached copies learn that the database changed — wait for a TTL, delete on write, or write through — and measure how stale your users' data really is.
ScaleContent Delivery Network (CDN)
Cache content at edge locations close to users, so most requests never cross an ocean or touch your origin — and design pages so they can actually be cached.
ScaleAsynchronous processing
Scaling with Message Queues
Move slow work out of the request path: a queue absorbs bursts, competing consumers scale the processing, backpressure keeps the system honest and a dead-letter queue catches poison messages.
ScaleKafka Partitioning
Partitions are Kafka's unit of parallelism and ordering. Choose the message key and partition count well and consumers scale linearly; choose badly and one hot partition holds everything back.
ScaleConsumer Groups
Consumer groups let many services read the same Kafka topic independently and let each service scale by adding members — with rebalances whenever membership changes.
ScaleData management
Database Indexing
Why the same query gets slower every day as a table grows, how a B-tree index turns a full scan into a few page reads — and why every extra index makes writes pay.
ScaleRead Replicas
Copy the database to replicas that serve reads, so the primary only handles writes — and learn to deal with replication lag, where users do not see what they just saved.
ScaleDatabase Partitioning
Split one huge table into smaller pieces inside the same database, so queries skip the pieces they do not need and old data is dropped in an instant instead of deleted row by row.
ScaleDatabase Sharding
Spread data across several independent databases by a shard key to scale writes and storage beyond one machine — and avoid the classic traps: hot shards, cross-shard queries and painful resharding.
ScaleReliability & resilience
High Availability
Remove single points of failure with redundant components and automatic failover — and tune failure detection so it reacts to real crashes, not to every network hiccup.
ScaleMulti-Region Architecture
Run in more than one region to survive a whole-region outage and serve users from nearby — choosing between active-passive and active-active, and paying for it with data replication.
Scale