Functional
- Read and write keys or rows through a stable logical schema.
- Support atomic multi-row transactions and snapshot reads.
- Repartition and repair online.
Provide a coherent data model across partitions, replicas, transactions, and failures.
Shard metadata and balancing are control-plane systems.
Gateways cache routing; shards scale independently.
Co-locate common access paths and optimize the fast path.
Write latency includes a quorum round trip.
These are reference assumptions, not universal facts. In an interview or architecture review, change them when the product context changes.
/v1/transactionsBegin transaction and return transaction identity/snapshot./v1/transactions/{id}/commitConditionally commit writes; retry-safe by transaction ID./v1/rows/{key}?at=Read latest or a specified consistent snapshot.key+timestamp, value/tombstone, transaction_idVersions support snapshots and conflict checks.start_key, end_key, epoch, replica_set, leaderEpoch fences stale routing and ownership.Parse requests and route work
Track timestamps and commit state
Store and agree on ordered mutations
Own placement and rebalancing
A gateway routes to the shard leader. The leader validates conflicts, appends the mutation to its consensus log, waits for quorum, applies to MVCC state, then acknowledges. Followers serve only reads allowed by the consistency contract.
Use a transaction record plus prepare/commit across participant shards. Resolve an uncertain coordinator by consulting durable transaction status. Timestamps and locks/intents require cleanup and deadlock policy.
Snapshot a key range to new replicas, stream the log tail, then transfer authority with a higher range epoch. Gateways encountering stale descriptors refresh and retry safely.
Expose an idempotent transaction identity and resolve outcome from durable state.
Transfer authority explicitly and fence stale replicas.
Move here when: Prove durability and transaction semantics.
Move here when: Data or write throughput exceeds one group.
Move here when: Predictability and disaster recovery become requirements.
Strong answer signal: Retry with transaction ID and return the durable prior outcome.
Strong answer signal: Read index/lease, bounded staleness, or explicit snapshot timestamps.
Strong answer signal: Epoch fencing and an atomic authority transition.