Design a trip-record datastore that scales past a single database instance, with fast lookup by rider.
Design the storage layer for an enormous, immutable log of trip records (think a ride-hailing platform's completed-trip history) that has outgrown what a single database instance can hold. The store must be sharded across multiple underlying database nodes, while still supporting a fast secondary lookup - finding every trip for a given rider. Distinct from the existing Ride Dispatch API problem - this one is about the storage/indexing layer, not the dispatch/cancel workflow.