Why you shouldn't do application-level sharding
Application-level sharding of an OLTP database looks simple on day one (a `shard_for(user_id % N)` function) but accumulates serious engineering burdens as a system grows.
Application-level sharding of an OLTP database looks simple on day one (a `shard_for(user_id % N)` function) but accumulates serious engineering burdens as a system grows.
Yelp moved roughly 1000 Cassandra pods and nearly a petabyte of data from self-managed Kubernetes clusters to Amazon EKS without streaming any data.
Neki, PlanetScale's Postgres sharding system, declares a primary dead only when its control plane (Admin) cannot reach it and at least one reachable replica reports broken replication with none contradicting.
CockroachDB 26.4 introduces skip-level upgrades so operators can move from one annual .4 release to the next without stopping at intermediate releases, and adds active-active writes across two data centers via transactional logical data replication.
Multigres, an open source Postgres cluster manager from the Vitess team, is now in private alpha on Supabase, running Postgres on three nodes across availability zones with automatic failover and built-in connection pooling behind a single connection string.
Sharding Postgres with PgDog let DBOS durable workflow throughput scale linearly from 20K workflows/sec on one db.m7i.4xlarge RDS instance to 1M workflows/sec across 50 shards.
OpenAI's Habitat storage platform went from one shared Azure Cosmos DB container, to per-use-case dedicated containers, and back to a shared multi-tenant container.
Neki's shard groups co-locate related Postgres tables by hashing a shared shard key (e.g. customer_id via xxhash) into a 64-bit keyspace split across shards, so joins and transactions for one customer stay on a single shard with full Postgres semantics.
Neki, PlanetScale's sharded Postgres, implements Postgres sequences by classifying sequence operations like nextval() as router-only, with an authoritative shard hosting all sequences so values are never duplicated across shards.
Neki, PlanetScale's Postgres sharding router, cuts per-query overhead by keeping PostgreSQL wire-protocol bytes intact and decoding only as much as each query requires.
Datadog built Distributed DataFusion, an open source Rust framework that extends Apache DataFusion's physical execution model so a single interactive query can run across many machines while keeping latency roughly flat as data grows.
When a shard key like tenant_id stops matching reality because a few whale tenants dominate load or cross-tenant queries appear, Neki (PlanetScale's sharded Postgres from the Vitess maintainers) offers three escalating fixes: vertically scale the hot shard with its own configuration profile, isolate the whale by narrowing hashed key ranges in the declarative data topology, or reshard specific tables by a better key.
Neki shards unmodified PostgreSQL behind a single connection string.
ZGateway is a stateless regional proxy tier in front of ZippyDB, Meta's most widely used key-value store.
Orbital compute creates a harder problem for stateful systems than for GPUs: data must be replicated, coordinated and placed across a moving constellation.
Cockroach Labs has made its CockroachDB Kubernetes Operator generally available.
Jump Trading runs a self-managed, on-prem ClickHouse cluster of tens of nodes as the system of record for petabyte-scale trading logs, ingesting hundreds of TB per day with peaks of 10M rows/sec and a sub-20-second p99, reconciled daily for zero data loss.
etcd v3.7.0 adds RangeStream, an RPC that returns large range results in chunks so neither server nor client has to buffer the whole response.
LogHouse, ClickHouse Cloud's internal logging platform, has grown to 431 PiB uncompressed (27 PiB on disk) and 1.59 quadrillion rows across 36 cells in 33 geoshards on three clouds, ingesting up to 80 GiB/s and 190M rows/s.
ClickHouse Cloud adds multi-stage distributed query execution, splitting a query plan into stages connected by exchange operators (Gather, Shuffle, Broadcast, Scatter) so intermediate data can be repartitioned between nodes mid-query.
"Multi-region" covers three distinct problems: CDN static asset distribution (level 1), stateless compute in multiple regions with a single-region database (level 2), and multi-region writes for stateful data (level 3).
Neon disabled Postgres full-page writes fleet-wide because its stateless compute streams WAL to a Paxos safekeeper quorum and has no local disk pages that can tear.
Index sharding in ClickHouse Cloud splits primary and secondary index analysis across replicas using consistent hashing over data parts.
Etsy moved shard routing for its ~1,000-table, ~1,000-shard, 425 TB MySQL cluster (1.7M requests/sec) from an ORM that looked up random shard mappings in a single index database to Vitess vindexes, without moving any data.