At a glance
| Supported databases | Proxy protocols: MySQL, MariaDB, PostgreSQL, plus a Firebird frontend in 5.5.3; SQL parsing also covers openGauss, SQL Server, Oracle and others |
| Pooling modes | Not documented in the pages checked |
| Routing and read/write splitting | Sharding rules route SQL to the right data nodes; readwrite-splitting rules send reads to replicas |
| Load balancing and failover | Readwrite-splitting rules spread reads across replicas; failover detection details not documented in the pages checked |
| Authentication and TLS | Not documented in the pages checked |
| Access modes | ShardingSphere-JDBC (Java library, no extra server) or ShardingSphere-Proxy (standalone server for any language) |
| Deployment | Proxy from binary tarball, Docker or Helm; GraalVM native image in alpha; JDBC embedded in Java applications |
| Licensing | Apache 2.0, free; Apache top-level project since April 2020 |
ShardingSphere suits teams, often Java shops, that want to shard or split existing MySQL or PostgreSQL databases without moving to a new distributed database. Use the JDBC library inside Java services and the Proxy for other languages and DBA tools. It is a large framework with its own rule language (DistSQL), so expect to learn it properly, and check SQL compatibility for your queries before relying on sharding.
Overview
Apache ShardingSphere describes itself as Database Plus: a layer on top of existing databases that adds sharding, read/write splitting, distributed transactions, data encryption, data masking, shadow databases for testing, traffic governance, data migration, SQL federation and observability. Rules are written in YAML or managed with DistSQL, ShardingSphere's SQL-like language for defining and querying rules at runtime.
There are two ways in. ShardingSphere-JDBC is a JAR that acts as an enhanced JDBC driver inside a Java application and works with ORMs such as MyBatis, JPA and Hibernate, with no extra server. ShardingSphere-Proxy is a separately deployed server that speaks the MySQL, MariaDB and PostgreSQL protocols, so any compatible client, language or admin tool can connect; 5.5.3 adds a Firebird frontend. The README describes a hybrid setup where both share one registry center and sharding strategy. The Proxy starts from a binary tarball, Docker or Helm, with a GraalVM native image in alpha.
Key features
- Data sharding across multiple database instances with configurable sharding rules
- Read/write splitting to primary and replica data sources
- Distributed transactions across shards
- Data encryption and data masking rules applied in the access layer
- Shadow database routing for testing with production traffic
- DistSQL for defining, querying and administering rules at runtime
- Two access modes, a Java JDBC library or a MySQL/PostgreSQL-protocol proxy, which can be combined
Integrations and ecosystem
Pros and cons
Pros
- Adds sharding and read/write splitting to existing MySQL and PostgreSQL databases rather than replacing them
- Choice of an in-process Java library or a language-neutral proxy
- Broad feature set in one framework: encryption, masking, shadow testing and migration as well as sharding
- Apache 2.0 licence under Apache Software Foundation governance
Cons
- Large framework with its own concepts and DistSQL, so the learning curve is steep
- Release cadence has slowed (5.5.3 about a year after 5.5.2), and 5.5.3 removed some features
- Sharded SQL compatibility depends on the parser and rules, so complex queries need checking
- ShardingSphere-JDBC only helps Java (JVM) applications
Pricing
Apache ShardingSphere is free, open source software from the Apache Software Foundation under the Apache 2.0 licence. There is no paid edition from the project; costs are the JVM hosts or containers for ShardingSphere-Proxy, any registry center used in cluster mode, and the backend databases.
Pricing checked on the vendor's official page on 7 November 2026. Prices change; confirm before buying.
Who it is best for
Java-centric teams that want to shard or split existing MySQL or PostgreSQL databases, add encryption or masking at the access layer, and keep their current database engines.
Typical use cases
- Splitting a large MySQL or PostgreSQL table across several databases by a sharding key
- Sending reads to replicas from Java services without changing SQL
- Encrypting or masking sensitive columns in the access layer
- Routing test traffic to a shadow database
- Migrating data from a single database into a sharded layout
Who should look elsewhere
- Teams that only need read/write splitting or pooling for MySQL: ProxySQL is a lighter fit.
- MySQL estates that want a sharding platform with a managed option: see Vitess.
Verdict
Apache ShardingSphere is a capable open source way to add sharding and data governance features on top of databases you already run, with a useful choice between an embedded Java library and a standalone proxy. Its breadth comes with complexity and a slower recent release pace, so validate your SQL and operational model before committing.
Frequently asked questions
What is the difference between ShardingSphere-JDBC and ShardingSphere-Proxy?
ShardingSphere-JDBC is a Java library used as an enhanced JDBC driver inside the application, with no separate server. ShardingSphere-Proxy is a standalone server that speaks the MySQL, MariaDB and PostgreSQL protocols, so clients in any language and DBA tools can use it. Both can share one registry center.
Which databases does ShardingSphere-Proxy support?
The README lists MySQL, MariaDB and PostgreSQL protocol versions of the Proxy, and 5.5.3 added a Firebird frontend. Its SQL parser also covers dialects such as openGauss, SQL Server and Oracle.
Is Apache ShardingSphere free?
Yes. It is an Apache Software Foundation project under the Apache 2.0 licence, with no paid edition from the project.
Sources
- Apache ShardingSphere home page
- ShardingSphere documentation: overview
- ShardingSphere documentation: ShardingSphere-Proxy user manual
- ShardingSphere GitHub repository (README)
- ShardingSphere 5.5.3 release notes
- Apache downloads: ShardingSphere
Checked November 2026.
Listed in: Database Proxy & Connection Pooling.
How we research reviews and what star ratings mean: our editorial method.