Production-ready PostgreSQL sharding solution.
Simplicity, performance, and true open source.
docker pull pgsharding/spqr-router:latest
PostgreSQL is awesome, but it's hard to manage a single database
with some terabytes of data and 105+ queries per second.
Existing sharding solutions focus on analytical and hybrid workloads (OLAP, HTAP).
Moreover, most of those solutions do not provide a simple,
painless path for the monolith ↔ sharded transitions.
That's why the Data
Platform team of Yandex.Cloud designed SPQR.
Licensed under PostgreSQL Global Development Group License—not AGPL. Use it freely in production, modify it, keep your changes private. No strings attached.
Battle-tested by Yandex Cloud's Data Platform team. Handle terabytes of data and 100K+ queries per second with confidence.
While competitors focus on analytics, SPQR excels at transactional workloads—the backbone of real applications.
Painless monolith → sharded transitions. No massive rewrites. Start small, scale when ready.
Use any existing managed PostgreSQL service for your shards. SPQR integrates seamlessly with AWS RDS, Google Cloud SQL, Azure Database, and more—focus on your app, not database ops.
Leverage PostgreSQL's full power across all shards. SPQR integrates seamlessly, reducing infrastructure complexity and letting you focus on your data, not your stack.
Queries per second
of data handled
Battle-tested at scale
PostgreSQL License
Shard by customer_id or product_category to handle massive catalogs and orders. Ensure fast lookups for user carts, orders, and recommendations across global user bases.
Distribute content by author_id or content_type for blogs, CMS, or media platforms. Scale read/write operations while keeping related data (comments, metadata) on the same shard.
Each microservice can have its own logical shard while sharing infrastructure. Simplify data architecture without managing multiple databases.
Shard by user_id to keep all user data and operations on a single shard. Perfect for services like email or social platforms where each user's mailbox, messages, and interactions are isolated and scalable.
Distribute sensor data, logs, or metrics by device_id or timestamp ranges. Scale horizontally as your device fleet grows.
E-commerce, fintech, and gaming applications with millions of transactions per day. SPQR handles short, frequent queries with minimal latency overhead.
Join the community and start sharding in minutes