Mycat2 vs PgDog
Mycat2
github.comPgDog
pgdog.devSide by side
| Figure | Mycat2 | PgDog |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | — | Yes |
| macOS | — | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 2 |
| Spec score · Database Proxy Software | 7.6 (#13) | 7.7 (#12) |
| License | The repository identifies the project license as Apache License from 2023.8. | The project is free and open source under AGPL-3.0, and the documentation says internal use does not require sharing source code. |
| Sharding | The project says data fragmentation improves query processing capabilities. | PgDog routes queries using sharding keys and can execute queries without a key across databases in parallel. |
Plans
In their own words
Mycat2
Mycat2 is free, open-source distributed relational database middleware for Linux and self-hosted deployment. It supports distributed SQL queries and the MySQL communication protocol while connecting to multiple backend databases through the Java ecosystem. Its query engine handles MySQL syntax and value types, rule- and cost-based optimization, and an independent physical execution engine. Data fragmentation is described as improving query processing. Users can customize and load sharding, serial-number and load-balancing algorithms. A project DSL manipulates physical query plans, forwards SQL and caches result sets. The README currently supports Java 8 only. Release notes for v1.22-2022-6-25 list ClickHouse as a backend for SELECT and INSERT, without returning auto-increment values. They also describe SQL permission interception, RSA encryption for user.json, and recycling inactive backend connections after a default 180-second timeout. The repository identifies an Apache License from 2023.8.
PgDog
PgDog is a PostgreSQL connection pooler, load balancer, and database sharder designed to scale databases without application changes. It multiplexes many application connections across fewer PostgreSQL server connections and supports SET, LISTEN/NOTIFY, and advisory locks. Read queries can be distributed across replicas while writes go to the primary, with health checks and failover detection. Sharding keys guide query routing; queries without a key can run across databases in parallel. Cross-shard transactions use PostgreSQL prepared transactions and two-phase commit, with automatic rollback on errors. PgDog can copy data and stream row changes to another database without pausing query traffic. Deployment options include Kubernetes Helm, Docker, AWS ECS Terraform, pre-built binaries, and source. Releases include Linux arm64 and amd64, Apple Silicon Mac, and Debian packages; the macOS binary is unsigned. The project is free and open source under AGPL-3.0, and documentation says internal use does not require sharing source code. Enterprise support includes architecture reviews, a dedicated Slack channel, and an SLA promising a response within 15 minutes.