Design a horizontally sharded relational database for a high-write order system. Support cross-shard queries for admin tools, online resharding, and read replicas for reporting without overloading primaries.
Functional requirements
- Shard orders by tenant or user id with consistent routing
- Primary-replica replication per shard
- Cross-shard admin queries via aggregator or federated layer
- Online resharding with minimal downtime
Non-functional requirements
- Sustain high write QPS across shards
- Reporting reads isolated from OLTP primaries