Each customer, their own shard.
The second way to shard is by who logs in. The gateway maps a login to one shard at authentication and locks the session there: no fan-out, no route-key override, no exception per role. Customers that share a cluster never share a shard they can reach.
Sharding and the gateway shipped in 1.1.0: every release server can run as a shard, and the gateway has release archives of its own. Not built yet: backup and restore of a whole cluster at one point, commit timestamps from a hybrid logical clock, and splitting a shard by cloning it.
Isolation by placement
Key sharding spreads one customer's rows for scale. Per-user shards do the opposite: they keep a customer whole and apart. A session cannot address any shard but its own, whatever SQL it sends.
- Login role → shard, decided at authentication
- Session locked: no fan-out, no route override
- Database-per-customer on a shared cluster
- Placement by policy: region, dedicated hardware, compliance tier
For platforms and for enterprises
A platform gives each of its users a database of their own behind one address. An enterprise keeps departments or subsidiaries on separate hardware because its policies say so. Both are the same mechanism: routing by credentials.
- Per-client latency and traffic statistics
- An API for customers and routes, behind a bearer token
- Settings kept in an embedded RasterizedDB inside the gateway