Mode

Configuration Item Explanation

Memory mode

Configuration Entrance

Class name: org.apache.shardingsphere.infra.config.mode.ModeConfiguration

Attributes:

NameData TypeDescription
type (?)StringMemory

Standalone mode

Configuration Entrance

Class name: org.apache.shardingsphere.infra.config.mode.ModeConfiguration

NameData TypeDescription
typeStringStandalone  
repositoryPersistRepositoryConfigurationConfiguration StandalonePersistRepositoryConfiguration
overwritebooleanLocal configurations overwrite file configurations or not; if they overwrite, each start takes reference of local configurations

StandalonePersistRepositoryConfiguration Configuration

Class name: org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepositoryConfiguration

Attributes:

NameData TypeDescription
typeStringStandalone Configuration persist type, such as: File
props (?)PropertiesConfiguration persist properties, such as: path

Standalone Properties Configuration:

NameData TypeDescriptionDefault
pathStringConfiguration information persist path.shardingsphere directory

Cluster mode

Configuration Entrance

Class name: org.apache.shardingsphere.infra.config.mode.ModeConfiguration

Attributes:

NameData TypeDescription
typeStringCluster  
repositoryPersistRepositoryConfigurationConfiguration ClusterPersistRepositoryConfiguration
overwritebooleanLocal configurations overwrite config center configurations or not; if they overwrite, each start takes reference of local configurations

ClusterPersistRepositoryConfiguration Configuration

Class name: org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration

Attributes:

NameData TypeDescription
typeStringCluster mode typ, such as: Zookeeper, Etcd
namespaceStringCluster mode instance namespace, such as: cluster-sharding-mode
server-listsStringZookeeper or Etcd server list,including IP and port number, use commas to separate, such as: host1:2181,host2:2181
propsPropertiesProperties for center instance config, such as options of zookeeper

ZooKeeper Properties Configuration

NameData TypeDescriptionDefault Value
digest (?)StringConnect to authority tokens in registry centerNo need for authority
operationTimeoutMilliseconds (?)intThe operation timeout milliseconds500 milliseconds
maxRetries (?)intThe maximum retry count3
retryIntervalMilliseconds (?)intThe retry interval milliseconds500 milliseconds
timeToLiveSeconds (?)intTime to live seconds for ephemeral nodes60 seconds

Etcd Properties Configuration

NameData TypeDescriptionDefault Value
timeToLiveSeconds (?)longTime to live seconds for data persist30 seconds