Skip to content
Distributed database middleware
Java ANTLR Vue JavaScript TSQL Shell Other
Branch: master
Clone or download

Latest commit

Latest commit cdb2f2a May 26, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github rename Sharding-JDBC to ShardingSphere-JDBC May 17, 2020
.mvn Merger master into orchestration 5.x (#4176) Feb 10, 2020
docs update powered by (#5762) May 22, 2020
examples fix sharding inline strategy for sharding examples (#5790) May 26, 2020
shardingsphere-control-panel Proxy handle heart beat event #control-panel-cluster (#5795) May 26, 2020
shardingsphere-db-protocol Support multi replica route and exeute (#5748) May 22, 2020
shardingsphere-distribution optimize ds config (#5734) May 21, 2020
shardingsphere-features Unify feature loading order (#5800) May 26, 2020
shardingsphere-infra Unify feature loading order (#5800) May 26, 2020
shardingsphere-integration-test Add raw and sourced package (#5788) May 25, 2020
shardingsphere-jdbc fix compile error (#5794) May 26, 2020
shardingsphere-kernal Replace ShardingSphereSchema (#5784) May 26, 2020
shardingsphere-proxy fix spelling (#5804) May 26, 2020
shardingsphere-scaling update mysql and postgresql server version (#5720) May 21, 2020
shardingsphere-sql-parser fix bug for ClassCastException when execute range query with differen… May 26, 2020
shardingsphere-transaction Merge shardingsphere-transaction-xa-xxx-manager and shardingsphere-tr… May 17, 2020
shardingsphere-ui fix UI (#5741) May 22, 2020
src/resources Fixes #4332 (#4333) Feb 16, 2020
.asf.yaml Merger master into orchestration 5.x (#4176) Feb 10, 2020
.gitignore update .gitignore Mar 20, 2019
.travis.yml Merger master into orchestration 5.x (#4176) Feb 10, 2020 delete incubating words (#5240) Apr 20, 2020 update May 17, 2020
LICENSE Update LICENSE (#3364) Oct 25, 2019 revert Maturity (#5242) Apr 20, 2020
NOTICE delete incubating words (#5240) Apr 20, 2020 update readme May 17, 2020 update readme May 17, 2020 update ui's build May 17, 2020
jenkinsfile try to optimize ci (#4500) Feb 28, 2020
lombok.config Merger master into orchestration 5.x (#4176) Feb 10, 2020
mvnw Merger master into orchestration 5.x (#4176) Feb 10, 2020
mvnw.cmd Merger master into orchestration 5.x (#4176) Feb 10, 2020
pom.xml add docker-compose-maven-plugin for integration test (#5742) May 22, 2020

ShardingSphere - Distributed Database Middleware Ecosphere

Official website:

License Gitter GitHub release Stargazers over time

Build Status Coverage Status Codacy Badge snyk OpenTracing-1.0 Badge Skywalking Tracing


EN doc CN doc


ShardingSphere is an open-source ecosystem consisted of a set of distributed database middleware solutions, including 2 independent products, ShardingSphere-JDBC & ShardingSphere-Proxy & ShardingSphere-Sidecar (todo). They all provide functions of data sharding, distributed transaction and database orchestration, applicable in a variety of situations such as Java isomorphism, heterogeneous language and cloud native.

Aiming at reasonably making full use of the computation and storage capacity of the database in a distributed system, ShardingSphere defines itself as a middleware, rather than a totally new type of database. As the cornerstone of many enterprises, relational database still takes a huge market share. Therefore, at the current stage, we prefer to focus on its increment instead of a total overturn.

ShardingSphere had graduated from Apache Incubator on April 16 2020, is now officially an Apache Project! Welcome discuss with community via shardingsphere dev mail list.

Apache releases are beginning from version 4.0.0

ShardingSphere Scope


Maven Status

ShardingSphere-JDBC defines itself as a lightweight Java framework that provides extra service at Java JDBC layer. With the client end connecting directly to the database, it provides service in the form of jar and requires no extra deployment and dependence. It can be considered as an enhanced JDBC driver, which is fully compatible with JDBC and all kinds of ORM frameworks.

  • Applicable in any ORM framework based on JDBC, such as JPA, Hibernate, Mybatis, Spring JDBC Template or direct use of JDBC.
  • Support any third-party database connection pool, such as DBCP, C3P0, BoneCP, Druid, HikariCP.
  • Support any kind of JDBC standard database: MySQL, Oracle, SQLServer, PostgreSQL and any SQL92 followed databases.

ShardingSphere-JDBC Architecture


Download Docker Pulls

ShardingSphere-Proxy defines itself as a transparent database proxy, providing a database server that encapsulates database binary protocol to support heterogeneous languages. Friendlier to DBA, the MySQL/PostgreSQL version provided now can use any kind of client access (such as MySQL Command Client, MySQL Workbench, Navicat etc.) that is compatible of MySQL/PostgreSQL protocol to operate data.

  • Totally transparent to applications, it can be used directly as MySQL and PostgreSQL.
  • Applicable to any kind of compatible client end that is compatible with MySQL and PostgreSQL protocol.

ShardingSphere-Proxy Architecture


ShardingSphere-Sidecar (TODO) defines itself as a cloud native database agent of the Kubernetes environment, in charge of all the access to the database in the form of sidecar. It provides a mesh layer interacting with the database, we call this as Database Mesh.

Database Mesh emphasizes on how to connect distributed database access application with the database. Focusing on interaction, it effectively organizes the interaction between messy applications and the database. The application and database that use Database Mesh to visit database will form a large grid system, where they just need to be put into the right position accordingly. They are all governed by the mesh layer.

ShardingSphere-Sidecar Architecture

ShardingSphere-JDBC ShardingSphere-Proxy ShardingSphere-Sidecar
Database Any MySQL/PostgreSQL MySQL/PostgreSQL
Connections Count Cost High Low High
Supported Languages Java Only Any Any
Performance Low loss Relatively High loss Low loss
Decentralization Yes No No
Static Entry No Yes No

Hybrid Architecture

ShardingSphere-JDBC adopts decentralized architecture, applicable to high-performance light-weight OLTP application developed with Java; ShardingSphere-Proxy provides static entry and all languages support, applicable for OLAP application and the sharding databases management and operation situation.

ShardingSphere is an ecosphere consists of multiple endpoints together. Through a mixed use of ShardingSphere-JDBC and ShardingSphere-Proxy and unified sharding strategy by the same registry center, ShardingSphere can build an application system applicable to all kinds of scenarios. Architects can adjust the system architecture to the most applicable one to current business more freely.

ShardingSphere Hybrid Architecture


Data Sharding

  • Database sharding & Table sharding
  • Read-write splitting
  • Sharding strategy customization
  • Centre-less Distributed primary key

Distributed Transaction

  • Unified Transaction API
  • XA transaction
  • BASE transaction

Database Orchestration

  • Dynamic Configuration
  • Orchestration & Governance
  • Data Encryption
  • Tracing & Observability
  • Elastic scaling out (Planning)

Project Status


How to Build

Build ShardingSphere

./mvnw clean install -Prelease


shardingsphere-distribution/shardingsphere-jdbc-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-jdbc-bin.tar.gz: Binary package of ShardingSphere-JDBC
shardingsphere-distribution/shardingsphere-proxy-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-proxy-bin.tar.gz: Binary package of ShardingSphere-Proxy
shardingsphere-distribution/shardingsphere-src-distribution/target/apache-shardingsphere-${latest.release.version} Source code package of ShardingSphere

Build ShardingSphere-UI

cd shardingsphere-ui
./mvnw clean install -Prelease


shardingsphere-ui/shardingsphere-ui-distribution/shardingsphere-ui-bin-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-ui-bin.tar.gz: Binary package of ShardingSphere-UI



ShardingSphere enriches the CNCF CLOUD NATIVE Landscape.

You can’t perform that action at this time.