shardingsphere README

The project's README from github.com/apache/shardingsphere. As one markdown file: README.md.

Apache ShardingSphere - Enterprise Distributed Database Ecosystem

Building the standards and ecosystem on top of heterogeneous databases, empowering enterprise data architecture transformation

Official Website: https://shardingsphere.apache.org/

GitHub Release Lines of Code

CI Quality Gate Status Technical Debt Maintainability Rating Security Rating codecov

OpenSSF Best Practices

Gitter

X

Star Geographical Distribution of apache/shardingsphere Pull Request Creator Geographical Distribution of apache/shardingsphere Issue Creator Geographical Distribution of apache/shardingsphere

OVERVIEW


Apache ShardingSphere is positioned as Database Plus, a standard and ecosystem built on top of heterogeneous databases. As an operating system layer above databases, ShardingSphere does not create new databases but focuses on maximizing the computing capabilities of existing databases, providing unified data access and enhanced computing capabilities.

Database Plus Core Concept: By building a standardized and scalable enhancement layer above databases, it makes heterogeneous databases as simple to use as a single database, providing unified governance capabilities and distributed computing capabilities for enterprise data architectures.

Connect, Enhance, and Pluggable are the three core pillars of Apache ShardingSphere:

Differentiation Advantages:

ShardingSphere became an Apache Top-Level Project on April 16, 2020, and has been adopted by 19,000+ projects worldwide.

DUAL-ACCESS ARCHITECTURE DESIGN


ShardingSphere adopts a unique dual-access architecture design, providing two access ends - JDBC and Proxy - that can be deployed independently or in hybrid deployment, meeting diverse requirements for different scenarios.

ShardingSphere-JDBC: Lightweight Access End

Positioning: Lightweight Java framework, enhanced JDBC driver

Core Features:

Use Cases: High-performance Java applications, integrated deployment with business applications, pursuing ultimate performance

ShardingSphere-Proxy: Enterprise Access End

Positioning: Transparent database proxy, independently deployed server-side

Core Features:

Use Cases: Heterogeneous language environments, database operation and maintenance management, enterprise applications requiring unified access entry

Hybrid Architecture Advantages

By hybridizing ShardingSphere-JDBC and ShardingSphere-Proxy with unified configuration through the same registry center, you can flexibly build application systems suitable for various scenarios:

AI ABSTRACTION

DeepWiki zread

DOCUMENTATION📜


EN doc CN doc

For full documentation & more details, visit: Docs

CONTRIBUTION🚀🧑💻


For guides on how to get started and setup your environment, contributor & committer guides, visit: Contribution Guidelines

Team


We deeply appreciate community contributors for their dedication to Apache ShardingSphere.

COMMUNITY & SUPPORT💝🖤


:link: Mailing List. Best for: Apache community updates, releases, changes.

:link: GitHub Issues. Best for: design discussions, bug reports, or anything development related.

:link: X. Best for: keeping up to date on everything ShardingSphere.

:link: LinkedIn. Best for: professional networking and career development with other ShardingSphere contributors.

PROJECT STATUS


:white_check_mark: Version 5.5.4-SNAPSHOT: Actively under development :tada:

🔗 For the release notes, follow this link to the relevant GitHub page.

:soon: Version 5.5.4

We are currently developing version 5.5.4, which includes multiple security enhancements and performance optimizations. Keep an eye on the milestones page of this repo for the latest development progress.

TECHNICAL ARCHITECTURE EVOLUTION


Apache ShardingSphere adopts a micro-kernel + 3-layer pluggable architecture, achieving complete decoupling of the kernel, functional components, and ecosystem integration, providing developers with ultimate flexibility and extensibility.

Micro-Kernel + 3-Layer Pluggable Model

Core Layer:

Feature Layer:

Ecosystem Layer:

Technical Innovation Highlights

Complete Decoupling Architecture:

Apache ShardingSphere consists of two access ends - JDBC and Proxy - that can be deployed independently or in hybrid deployment, providing unified distributed database solutions for diverse application scenarios including Java isomorphism, heterogeneous languages, and cloud-native environments.

ShardingSphere-JDBC


Maven Status

A lightweight Java framework providing extra services at the Java JDBC layer. With the client end connecting directly to the database, it provides services in the form of a jar and requires no extra deployment and dependence.

:link: For more details, follow this link to the official website.

Note: When using ShardingSphere-JDBC adapter, pay attention to your application's memory configuration. Antlr uses an internal cache to improve performance during SQL parsing. If your application has too many SQL templates, the cache will continue to grow, occupying a large amount of heap memory. According to feedback from the ANTLR official issue#4232, this issue has not yet been optimized. When connecting your application to ShardingSphere-JDBC, it is recommended to set a reasonable heap memory size using the -Xmx parameter to avoid OOM errors caused by insufficient memory.

ShardingSphere-Proxy


Nightly-Download Download Docker Pulls

A transparent database proxy, providing a database server that encapsulates the database binary protocol to support heterogeneous languages. Friendlier to DBAs, the MariaDB, MySQL and PostgreSQL version now provided can use any kind of terminal.

:link: For more details, follow this link to the official website.

Hybrid Architecture


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

Through the combination of ShardingSphere-JDBC & ShardingSphere-Proxy together with a unified sharding strategy by the same registry center, the ShardingSphere ecosystem can build an application system suitable to all kinds of scenarios.

:link: More details can be found following this link to the official website.

CORE FEATURE MATRIX


Distributed Database Core Capabilities

Data Security & Governance

Database Gateway Capabilities

shardingsphere (apache/shardingsphere)

Searching Database…

What is this?An Apache Top-Level Project positioned as 'Database Plus': a layer built over your existing heterogeneous databases that adds distributed SQL - sharding, read/write splitting, encryption - without making you replace them.
Is it a library I plug into my app, or a separate server I deploy?Both, by design: ShardingSphere-JDBC is an enhanced JDBC driver (a JAR inside your Java app), ShardingSphere-Proxy is an independently deployed transparent database proxy, and the two can run in a hybrid deployment.
How do I get started with it?For Java, add ShardingSphere-JDBC as a JAR dependency - zero extra deployment. Otherwise deploy ShardingSphere-Proxy as a standalone server and point any MySQL or PostgreSQL client at it. Full docs are on the official website.
Do I have to be writing Java to use it?Java only if you pick the JDBC end. ShardingSphere-Proxy speaks the native MySQL and PostgreSQL binary protocols, so clients in any language connect to it as if it were a regular database server.
Any gotchas I should know about before using the JDBC driver?The JDBC driver's ANTLR parser caches parsed SQL, and with many SQL templates the cache grows and can exhaust heap memory (OOM). The README advises setting a reasonable -Xmx heap size for your application.
Can I use ShardingSphere-JDBC and ShardingSphere-Proxy together?Yes - hybrid architecture is a first-class mode. Both ends are wired through the same registry center with a unified sharding strategy, so high-performance Java OLTP apps can go through JDBC while Proxy serves heterogeneous languages, OLAP workloads and DBA management.
How mature is the project?It graduated to an Apache Top-Level Project on April 16, 2020, and the README says it has been adopted by 19,000+ projects worldwide. Version 5.5.4-SNAPSHOT is under active development, with 5.5.4 bringing multiple security enhancements and performance optimizations.
What does the pluggable architecture mean in practice?A micro-kernel with three decoupled layers: a core layer (query optimizer, distributed transactions, execution engine), a feature layer (sharding, encryption, masking, audit, shadow database) and an ecosystem layer (database protocol adaptation, registry integration). Features combine on demand - the README compares it to building with LEGO blocks.
Creator
apache
Size
690.9 MB
Stars
20.8K
Age
10y
Commits · 90 Days