Building Blocks We Will Use
Why this matters: four of these five blocks do exactly what they did in earlier chapters. One does not, and spotting which is the point of the lesson.
Based on our requirements and estimations, we will use the following core components.
| Building block | Role here |
|---|---|
| Load balancers | Distribute user requests across multiple servers and services |
| Databases | Store metadata and graph-structured data |
| CDNs | Deliver static content to end users, reducing latency and server load |
| Pub-sub system | Manage real-time messaging and events |
| Cache | Store frequently accessed data to improve performance |
Additional components, such as an API gateway and ZooKeeper, are also critical.
Key takeaway
Five blocks — load balancers, databases, CDNs, pub-sub, cache — plus an API gateway and ZooKeeper. Four behave as before. The cache does not: it stores output that was computed, not fetched, so a miss costs GPU-seconds rather than milliseconds and every caching rule shifts — lower hit rates pay off, and approximate matching becomes worthwhile. The CDN carries only the wrapper, since responses cannot be cached at the edge. And ZooKeeper's recovery is minutes, not seconds, because a replacement server must load 140 GB of weights.
Next: the high-level design and the path a prompt takes through it.