It shows the map cut into cells. So “which segments are here” becomes a lookup of one cell and its neighbours, not a search of every segment.
Before you start. Three lessons are borrowed. What is near me (geohash cells, and fences by ray casting) built the grid of cells from scratch: how a place becomes a cell, and why a point near the edge of a cell needs the neighbouring cells too. This lesson uses that grid to find segments. Design Twitter, in the interview showed the feed for an account with millions of followers: write into each follower’s list, except for the biggest accounts. Charged Twice (idempotency & exactly-once) gave you the idempotency key, the label that makes a repeated request safe. This lesson is how to say it all in forty-five minutes.
Lesson 114 of 115 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.