Geospatial datastore sharding
Your task
Design the sharding and partitioning scheme for a global geospatial datastore that holds 1B moving entities and serves both point lookups by id and radius/kNN spatial queries, with hotspots in dense metros (Tokyo, NYC) and quiet rural regions. How do you partition so spatial queries stay local while avoiding hot shards, and how do you rebalance as density shifts?
It covers
- Sharding
- Consistent hashing
- Rebalancing