~learn.
lecture · 23:02 · 5 checkpoints · browser voiceAdvanced

Location search and search at scale

One illustrative launch night in Bengaluru and the location bugs that break it, then the fixes: why a B-tree on (lat, lng) reads a 600 km strip; cells, coverings and refine; geohash and its edge problem (cell plus 8 neighbours); quadtrees, S2's numbered Hilbert cells and H3's equidistant hexagons; R-trees in PostGIS and BKD points in Elasticsearch; radius queries end to end and a safe ring count; k-nearest with a stopping bound; moving partners as soft state in memory (75,000 writes a second, only about 1,700 cell moves); sharding by load and hot cells; and the search cluster's topology, shard sizing and alias reindexing.

01 · Previously
W07 · DAY 05 · Location Search and Search at Scale

Day 5: location search, then scale.

Previously: typeahead

Previously, on Day 4, you built typeahead: answering a prefix of text in milliseconds, because the work was done ahead of time.