ShardingSphere 4.x Orchestration-Config Center

Motivation

  • Centralized configuration: more and more running examples have made it hard to manage separate configurations and asynchronized configurations can cause serious problems. Concentrating them in the configuration center can make the management more effective.
  • Dynamic configuration: distribution after configuration modification is another important capability of configuration center. It can support dynamic switch between data sources, tables, shards and the read-write split strategy.

Data Structure in Configuration Center

Under defined name space config, configuration center stores data sources, sharding databases, sharding tables, read-write split, and properties in YAML. Modifying nodes can dynamically manage configuration.

config/authentication

config/sharding/props

It corresponds to Sharding Properties in ShardingSphere configuration.

config/schema/schemeName/datasource

A collection of multiple database connection pools, whose properties (e.g. DBCP, C3P0, Druid and HikariCP) are configured by users themselves.

config/schema/sharding_db/rule

It refers to sharding configuration, including sharding + read-write split configuration.

config/schema/masterslave/rule

This configuration is used when read-write split is used alone.

Dynamic Effectiveness

Modification, deletion and insertion of relevant configurations in the registry center will immediately take effect in the producing environment.

Open-sourced distributed database middleware for data sharding, read-write splitting and BASE transaction. https://github.com/sharding-sphere/sharding-sphere