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…

这是什么?一个 Apache 顶级项目,定位为「Database Plus」:它在你现有的各种异构数据库之上加了一层,提供分布式 SQL 能力——分库分表、读写分离、数据加密——而不需要你更换现有的数据库。
它是嵌到我应用里的库,还是需要单独部署的服务器?两种都有,这是它的设计:ShardingSphere-JDBC 是增强版 JDBC 驱动(一个嵌入 Java 应用里的 JAR),ShardingSphere-Proxy 是独立部署的透明数据库代理,两者还可以混合部署。
我该怎么上手?如果用 Java,把 ShardingSphere-JDBC 作为 JAR 依赖加进来就行——不需要额外部署。否则就部署 ShardingSphere-Proxy 作为独立服务,让任何 MySQL 或 PostgreSQL 客户端连上去。完整文档见官方网站。
用它是不是必须写 Java?只有选 JDBC 方式才需要 Java。ShardingSphere-Proxy 直接讲原生的 MySQL 和 PostgreSQL 二进制协议,任何语言的客户端都能连它,就像连一台普通数据库服务器一样。
用这个 JDBC 驱动之前,有什么坑需要知道?JDBC 驱动的 ANTLR 解析器会缓存解析过的 SQL,如果 SQL 模板很多,缓存会不断增长,可能把堆内存耗尽(OOM)。README 建议给应用设置一个合理的 -Xmx 堆大小。
ShardingSphere-JDBC 和 ShardingSphere-Proxy 可以一起用吗?可以——混合架构是一等公民模式。两端通过同一个注册中心接入,共享统一的分片策略,因此高性能的 Java OLTP 应用可以走 JDBC,而 Proxy 则服务异构语言、OLAP 负载和 DBA 运维管理。
这个项目成熟吗?它于 2020 年 4 月 16 日毕业成为 Apache 顶级项目,README 称已被全球 19000 多个项目采用。5.5.4-SNAPSHOT 版本正在积极开发中,5.5.4 带来了多项安全增强和性能优化。
「可插拔架构」实际是什么意思?它是一个微内核加三层解耦的架构:核心层(查询优化器、分布式事务、执行引擎)、功能层(分片、加密、脱敏、审计、影子库)和生态层(数据库协议适配、注册中心集成)。各功能可以按需组合——README 把它比作用乐高积木搭建。
Creator
apache
Size
691 MB
Stars
20.8K
Age
10y
Commits · 90 Days