• Stars
    star
    943
  • Rank 48,473 (Top 1.0 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.

LICENSE Language Leaderboard

δΈ­ζ–‡ζ–‡ζ‘£

What is PolarDB-X ?

PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage and complex querying scenarios. It has a shared-nothing architecture in which computing is decoupled from storage. It supports horizontal scaling, distributed transactions and Hybrid Transactional and Analytical Processing (HTAP) workloads, and is characterized by enterprise-class, cloud native, high availability, highly compatible with MySQL and its ecosystem.

PolarDB-X was originally created to solve the database's scalability bottleneck of Alibaba Tmall's "Double Eleven" core transaction system, and has grown with AliCloud along the way, and is a mature and stable database system that has been verified by many customers' core business systems.

The core features of PolarDB-X include:

  • Horizontal Scalability

PolarDB-X is designed with Shared-nothing architecture, supporting multiple Hash and Range data sharding algorithms and achieving transparent horizontal scaling through implicit primary key sharding and dynamic scheduling of data shard.

  • Distributed Transactions

PolarDB-X adopts MVCC + TSO approach and 2PC protocol to implement distributed transactions. Transactions meet ACID characteristics, support RC/RR isolation levels, and achieve high performance through optimizations such as one-stage commit, read-only transaction, and asynchronous commit.

  • HTAP

PolarDB-X supports analytical queries through native MPP capability, and achieves strong isolation of OLTP and OLAP traffic through CPU quota constraint, memory pooling, storage resource separation, etc.

  • Enterprise-class

PolarDB-X has many capabilities designed for enterprise scenarios, such as SQL Concurrency Control, SQL Advisor, TDE, Triple Authority Seperation, Flashback Query, etc.

  • Cloud Native

PolarDB-X has years of cloud native practice on AliCloud, supports managing cluster resources via K8S Operator, supports public cloud, hybrid cloud, private cloud and other forms for deployment.

  • High Availability

PolarDB-X achieves strong data consistency through Multi-Paxos protocol, supports cross-data center deployment, and improves system availability through Table Group, Geo-locality, etc.

  • Compatible with MySQL and Its Ecosystem

The goal of PolarDB-X is to be fully compatible with MySQL, which currently includes MySQL protocol, most of MySQL SQL syntax, Collations, transaction isolation level, binary log, etc.

Quick Start

To quick start with PolarDB-X

PolarDB-X supports one-click installation by PXD tool, through which you can quickly try the functions of PolarDB-X.

See the PXD Quick Start.

To quick start with PolarDB-X on Kubernetes

PolarDB-X provides K8S deployment mode, through which you can customize the configuration of PolarDB-X cluster.

See the K8S Quick Start.

To start developing PolarDB-X

If you want to compile and install PolarDB-X from source code, or start development, you can refer the Development Guide.

The core features of PolarDB-X community version will be consistent with the commercial version, and more manuals can be found in the documentations of the commercial version. The documentations of the community version are being compiled and will be released to the public in the near future.

Architecture

image.png PolarDB-X has a shared-nothing architecture in which compute and storage is decoupled, and the system consists of 4 core components.

  • CN (Compute Node)

The Compute Node is the entry point of the system and is stateless, which includes modules such as SQL parser, optimizer, and executor. It is responsible for distributed data routing, 2PC coordination, global secondary index maintenance, etc. It also provides enterprise features such as SQL concurrency control and triple authority separation.

  • DN (Data Node)

The Data Node is responsible for data persistence, providing strong data consistency based on the Multi-Paxos protocol, while maintaining distributed transaction visibility through MVCC.

  • GMS (Global Meta Service)

The Gloal Meta Service is responsible for maintaining globally consistent Table/Schema, Statistics and other system Meta information, maintaining security information such as accounts and permissions, and providing global timing services (i.e. TSO).

  • CDC (Change Data Capture)

The CDC Node provides change data capture capability that is fully compatible with the MySQL binary log format and MySQL DUMP protocol, and master-slave replication capability that is compatible with the MySQL Replication protocol.

PolarDB-X provides tool to manage the above components through K8S Operator, and the RPC between the CN and DN can be done through private protocol component. The corresponding repositories of these components are as follows.

Component Name Repository Version
CN (Compute Node) polardbx-sql v5.4.13-16615127
GMS (Global Meta Service) polardbx-engine v1.0.2
DN (Data Node) polardbx-engine v1.0.2
CDC (Change Data Capture) polardbx-cdc v5.4.13
RPC polardbx-glue v5.4.13-16615127
K8S Operator polardbx-operator v1.2.2

What is PolarDB-X SQL ?

PolarDB-X SQL is one component of PolarDB-X, namely CN (Compute Node).

Licensing

PolarDB-X SQL is under the Apache License 2.0. See the License file for details.

Contributing

You are welcome to make contributions to PolarDB-X. We appreciate all the contributions. For more information about how to start development and pull requests, see contributing.

Community

You can join these groups and chats to discuss and ask PolarDB-X related questions:

  • DingTalk Group: 32432897
    DingTalk Group
  • WeChat Group: ι˜Ώι‡ŒδΊ‘ PolarDB-X 开源亀桁羀 (Contact group manager to get into wechat group. Managers' ID: oldbread3, hustfxj, agapple0002)
    WeChat Manager 1 WeChat Manager 2 WeChat Manager 3

Acknowledgements

PolarDB-X SQL references from many open source projects, such as Calcite, Presto etc. Sincere thanks to these projects and contributors.

More Repositories

1

PolarDB-for-PostgreSQL

A cloud-native database based on PostgreSQL developed by Alibaba Cloud.
C
2,830
star
2

PolarDB-FileSystem

C++
192
star
3

galaxyengine

GalaxyEngine is a MySQL branch originated from Alibaba Group, especially supports large-scale distributed database system.
C++
170
star
4

galaxycdc

GalaxyCDC is a core component of PolarDB-X which is responsible for global binary log generation, publication and subscription.
Java
45
star
5

galaxykube

PolarDB-X Operator is a Kubernetes extension that aims to create and manage PolarDB-X cluster on Kubernetes.
Go
44
star
6

PolarDB-X

PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.
Makefile
37
star
7

galaxyglue

GalaxyGlue is an extension to MySQL Connector/J 8.0.
Java
27
star
8

PolarDB-Stack-Operator

PolarDB Stack is a DBaaS implementation for PolarDB-for-Postgres, as an operator creates and manages PolarDB/PostgreSQL clusters running in Kubernetes. It provides re-construct, failover swtich-over, scale up/out, high-available capabilities for each clusters.
Go
24
star
9

PolarDB-NodeAgent

PolarDB-NodeAgent is a light-weight and flexible agent for data collection, which supports performance data collection from hosts and instances. It is a plug-in process running on physical machines or virtual machines, collecting performance data every second and real-time logs of all the instances (both containerized instances and non-containerized instances) on the machine.
Go
15
star
10

PolarDB-Stack-Workflow

Go
13
star
11

PolarDB-Stack-Storage

Go
11
star
12

PolarDB-ClusterManager

PolarDB Cluster Manager is the cluster management component of PolarDB for PostgreSQL, responsible for topology management, high availability, configuration management, and plugin extensions.
Go
11
star
13

PolarDB-Stack-Daemon

PolarStack-Daemon is a daemon process in DBaaS PolarStack. It runs on all hosts and is responsible for port status collection, db log clear, db engine images availability collection, host network status collection. It provides the basic host information and status for db cluster creating/migrating/state recognition and running.
Go
10
star
14

PolarDB-Stack-Common

Go
9
star
15

PolarDB-Hands-On

C
6
star
16

polardbx-backup

polardbx-backup is a hot backup tool for PolarDB-X
C++
3
star
17

polardb-pg-docker-images

Shell
3
star
18

PolarDB-Hackathon-2023

3
star
19

PolarDB-ImageBuilder

Python
3
star
20

galaxysql-tools

Tools for PolarDB-X, such as data migration, CSV files import, benchmark, etc.
Java
3
star
21

learn-some-polardb-x

Java
1
star
22

PolarDB-BackupAgent

A distributed, high performance and high avaliable backup agent for polardb pg which has rich features and is easy to extend storage plugins.
C
1
star