SPQR vs TurbineProxy
SPQR
docs.pg-sharding.techTurbineProxy
turbineproxy.comSide by side
| Figure | SPQR | TurbineProxy |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | — | Yes |
| Linux | Yes | Yes |
| API | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Database Proxy Software | 7.8 (#9) | 7.6 (#16) |
| Deployment | The getting-started guide provides a Docker image and lists router, admin console, and gRPC API ports as 6432, 7432, and 7000. | The site lists binary, Docker, Homebrew, AUR, .deb, and .rpm installation options. |
| License | The source is distributed under the PostgreSQL Global Development Group License. | The site describes TurbineProxy as open source under the Apache-2.0 license, with no per-query fees. |
| Security | The docs show PostgreSQL connections configured with SSL modes including require and verify-full. | Listed security features include SQL injection detection, per-user read-only enforcement, query allowlists, and AES-256-GCM at-rest encryption. |
Plans
In their own words
SPQR
SPQR is a self-hosted query router for horizontally scaling PostgreSQL through sharding. It can extract a sharding key from a query and route it to the relevant key range and shard when possible; keys can use one column or several. Queries can also specify a key or shard in a SQL comment. Applications connect using the PostgreSQL protocol, and the router and coordinator provide administrative consoles accessible through psql. SPQR supports one-phase and two-phase commit strategies; two-phase commit provides atomicity across shards and requires max_prepared_transactions greater than zero on each shard. The system can move data between shards to balance workload, and the project describes reducing transferred ranges to limit locking impact. Its documentation includes Docker and configuration-file deployment instructions. SPQR is free and distributed under the PostgreSQL Global Development Group License. The FAQ cautions that it is not suited to complex cross-shard queries, transactions modifying multiple shards or OLAP workloads, and reports a roughly 10–30% performance drop versus vanilla PostgreSQL depending on workload.
TurbineProxy
TurbineProxy is a self-hosted Rust proxy for MySQL and PostgreSQL that directs reads and writes according to query intent, without requiring application code changes. It can route across replicas or run as a standalone proxy in front of one database server. Replica routing supports round-robin or least-connections balancing and excludes replicas when lag exceeds a configured threshold. Per-backend connection pools use multiplexing and configurable sizes. Security controls include SQL injection detection, per-user read-only rules, query allowlists, and AES-256-GCM encryption at rest. For MySQL 8.0 and later, it specifies GTID-aware read-your-own-writes support. A web dashboard, Prometheus metrics, query analytics, a heatmap, and Grafana dashboard JSON cover observability. Its embedded MCP server offers seven tools over JSON-RPC 2.0 with Basic Auth, including slow-query analysis, N+1 detection, index advice, replica lag, and backend health. It is open source under Apache-2.0, with a free plan at free and no per-query fees. Install options include binary, Docker, Homebrew, AUR,.deb, and.rpm.