mode (?): # Default value is Standalone
type: # Type of mode configuration. Values could be: Standalone, Cluster
repository (?): # Persist repository configuration
mode:
type: Standalone
repository:
type: # Type of persist repository
props: # Properties of persist repository
foo_key: foo_value
bar_key: bar_value
mode:
type: Cluster
repository:
type: # Type of persist repository
props: # Properties of persist repository
namespace: # Namespace of registry center
server-lists: # Server lists of registry center
foo_key: foo_value
bar_key: bar_value
ZooKeeper
registry center is recommended for cluster mode deployment.ZooKeeper
, please refer to the config information there.mode:
type: Standalone
repository:
type: JDBC
mode:
type: Cluster
repository:
type: ZooKeeper
props:
namespace: governance
server-lists: localhost:2181
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
Using the persistent repository requires additional introduction of the corresponding Maven dependencies. It is recommended to use:
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-cluster-mode-repository-zookeeper</artifactId>
<version>${shardingsphere.version}</version>
</dependency>