SPQR vs TiCDC
SPQR
docs.pg-sharding.techTiCDC
docs.pingcap.comSide by side
| Figure | SPQR | TiCDC |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | Yes |
| macOS | — | Yes |
| Linux | Yes | Yes |
| API | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Database Proxy Software | 7.8 (#9) | 8.1 (#6) |
| Deployment | The getting-started guide provides a Docker image and lists router, admin console, and gRPC API ports as 6432, 7432, and 7000. | TiCDC can be deployed with a new TiDB cluster or added to an existing cluster using TiUP. |
| Intended users | SPQR is presented as a fit for PostgreSQL developers who want to avoid application-level sharding logic and workloads suited to single-shard OLTP queries. | Documented use cases include disaster recovery, real-time data feeds for monitoring, caching, indexing and analysis, and replication between heterogeneous databases. |
| Security | The docs show PostgreSQL connections configured with SSL modes including require and verify-full. | The deployment guide documents enabling TLS between TiDB components, including TiCDC. |
| Support | The project directs users to its Telegram chat for discussion and GitHub Issues for bug reports or feature requests. | PingCAP directs paid-plan users to support tickets and all users to community Slack support. |
| What it does | SPQR is a stateless PostgreSQL query router for horizontally scaling PostgreSQL through sharding. | TiCDC captures TiKV change logs, orders them, and exports row-level incremental changes from TiDB to downstream systems. |
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.
TiCDC
TiCDC is a free, open-source, self-hosted tool for replicating incremental data changes from TiDB. It captures TiKV change logs, sorts the changes, and exports row-based data to systems including TiDB, MySQL-compatible databases, Kafka, Amazon S3, GCS, Azure Blob Storage, and NFS. Recommended Kafka formats include Canal-JSON, Avro, and Debezium. Filters can select databases, tables, DMLs, and DDLs, while the Open API can check task status, change task configuration, and create or delete tasks. TiCDC supports replication between TiDB clusters for disaster recovery, with second-level RPO and minute-level RTO, as well as bidirectional replication for multi-active deployments. It can be deployed with a new cluster or added to an existing one; production guidance recommends at least two instances. The system has no single point of failure and allows nodes to be added or removed dynamically. Delivery is at least once, so failures can lead to repeated statements or Kafka messages.