
ch1: Scale From Zero to Millions of Users
Post 1•Single Server Setup
Starting from the simplest possible architecture: everything, web app, database, cache, running on one server, and tracing the request flow from DNS to response.
- Post 2•
Database
Splitting the web tier and data tier onto separate servers, and choosing between relational (SQL) and non-relational (NoSQL) databases.
- Post 3•
Vertical vs Horizontal Scaling
Two ways to give a system more capacity: a bigger server (scale up) or more servers (scale out), why scale up runs out of room, and why that leads to a load balancer.
- Post 4•
Load Balancer
Putting a load balancer in front of the web tier: how traffic flows through it, why web servers move to private IPs, and how it gives the web tier failover and easy scaling.
- Post 5•
Database Replication
Splitting the database into a write master and multiple read replicas: why it improves performance, reliability, and availability, and what happens when a master or a slave goes offline.
- Post 6•
Cache
Adding a cache tier between the web servers and the database: the read-through pattern, and the tradeoffs that decide what to cache, when it expires, and what happens when it fills up or goes offline.
- Post 7•
Content Delivery Network (CDN)
Serving static files (images, video, CSS, JavaScript) from a network of edge servers close to the user: how a CDN fills on a miss, the TTL that controls freshness, and the cost, fallback, and invalidation tradeoffs.
- Post 8•
Stateless Web Tier
Moving user session data off the web servers and into a shared store, so any server can handle any request and the web tier can scale and auto-scale freely.
