All Questions
Sharding hard

For spatial location-based sharding (like Uber or DoorDash), why is a 'Geohash' preferred over sharding by simple Latitude and Longitude coordinate pairs?

  1. A It uses significantly fewer characters, reducing the storage overhead on the physical disk.
  2. B It 'linearizes' two-dimensional coordinates into a one-dimensional string where common prefixes indicate physical proximity. This allows standard B-Tree 'Range Scans' to find nearby drivers efficiently.
  3. C It is more mathematically accurate for areas near the Earth's poles where standard latitude calculations fail.
  4. D It provides built-in encryption that anonymizes the user's exact location to comply with privacy regulations.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions