02Chapter 2: Modeling users, posts and follow edgesThis chapter defines the three core entities of a news feed: users, posts and follow edges. Every later choice rests on them: fan-out on read, fan-out on write, the hybrid approach, pagination and the feed cache. A weak model here makes each of those harder.7 min read
03Chapter 3: Building the feed at read timeThis chapter covers the pull model, also called fan-out on read. It assumes you know basic HTTP APIs, relational tables and key-value stores, and can read short Python and SQL snippets. It also assumes you have seen the data model from the previous chapter: users, posts, and follow edges.8 min read
04Chapter 4: Pushing posts into follower timelines at write timeFan-out on write, also called the push model, moves the work of building a feed from the moment a user reads to the moment an author posts. This chapter explains how the push path works, what it costs, and where it fails. It assumes you have read the chapters on requirements, the data model, and fan7 min read
05Chapter 5: A hybrid approach for accounts with millions of followersThis chapter assumes you have read the previous two chapters on fan-out on read and fan-out on write. You should also be comfortable with the data model (users, posts, follow edges) and with reading short Python snippets. Here we combine the two strategies so that one design handles both ordinary ac8 min read
06Chapter 6: Serving the feed with cursor paginationThis chapter covers how the feed API returns a long timeline in pages without duplicates or gaps. It assumes you know HTTP APIs, basic SQL, and the fan-out models from the earlier chapters. You should be able to read short Python and SQL.8 min read
07Chapter 7: Storing timelines in a bounded cacheThis chapter covers how to store precomputed timelines in a cache, how to keep each one at a fixed size, and what to do when the cache is empty, partial, or out of date. It assumes you have read the chapters on fan-out on write and cursor pagination. You should also know basic Redis commands (sorted8 min read
08Chapter 8: Ranking the candidate feedThis chapter assumes you know how fan-out on write and fan-out on read produce a list of post references per user. It also assumes you know what a bounded feed cache is, and that you can read short Python and SQL snippets. Here we add a ranking stage on top of that list.7 min read
09Chapter 9: Sharding and scaling the pipelineEarlier chapters built the feed logic on a single logical store. This chapter splits that store across many machines. It assumes you know the fan-out on write and hybrid designs from the previous chapters, and that you have used a key-value store such as Redis and a relational database. You should a7 min read
10Chapter 10: Freshness, consistency and failure handlingThe earlier chapters built a feed that is fast to read: posts are pushed into bounded per-user timelines, high-follower accounts are pulled at read time, and the client pages through results with a cursor. This chapter covers what happens when that pipeline is slow, out of order or partly broken.8 min read
11Chapter 11: Handling deletes, unfollows, blocks and privacyThis chapter assumes you have read the earlier chapters on the data model, fan-out on write, hybrid fan-out, cursor pagination and the feed cache. You should know that a timeline stores (timestamp, post_id) references rather than full posts. You should also be comfortable reading short Python snip9 min read