2dbi
Home/PlanetScale/Route a Query to the Correct Shard (Practical)
PPlanetScale·DSAEngineerOnsite – Coding (Practical)

Route a Query to the Correct Shard (Practical)

Problem

Given a sharding scheme (key ranges or hash), implement routing of a query/key to the right shard, and a scatter-gather for cross-shard queries.

Example

key -> shard via range/hash; cross-shard aggregate via gather

Constraints

  • Handle resharding boundaries

What PlanetScale looks for

Vitess-grounded: shard routing and scatter-gather are core to PlanetScale's distributed MySQL.

added 6 days ago
LeadersAccount