Algorithm

Sharding

  1. <!-- algorithmName is specified by users and its property should be consistent with that of algorithm-ref in the sharding strategy. -->
  2. <!-- type and props, please refer to the built-in sharding algorithm: https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/sharding/ -->
  3. <sharding:sharding-algorithm id="algorithmName" type="xxx">
  4. <props>
  5. <prop key="xxx">xxx</prop>
  6. </props>
  7. </sharding:sharding-algorithm>

Encryption

  1. <!-- encryptorName is specified by users, and its property should be consistent with that of encrypt-algorithm-ref in encryption rules. -->
  2. <!-- type and props, please refer to the built-in encryption algorithm: https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/encrypt/ -->
  3. <encrypt:encrypt-algorithm id="encryptorName" type="xxx">
  4. <props>
  5. <prop key="xxx">xxx</prop>
  6. </props>
  7. </encrypt:encrypt-algorithm>

Read/Write Splitting Load Balancer

  1. <!-- loadBalancerName is specified by users, and its property has to be consistent with that of load-balance-algorithm-ref in read/write splitting rules. -->
  2. <!-- type and props, please refer to the built-in read/write splitting algorithm load balancer: https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/load-balance/ -->
  3. <readwrite-splitting:load-balance-algorithm id="loadBalancerName" type="xxx">
  4. <props>
  5. <prop key="xxx">xxx</prop>
  6. </props>
  7. </readwrite-splitting:load-balance-algorithm>

Shadow DB

  1. <!-- shadowAlgorithmName is specified by users, and its property has to be consistent with that of shadow-algorithm-ref in shadow DB rules. -->
  2. <!-- type and props, please refer to the built-in shadow DB algorithm: https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/shadow/ -->
  3. <shadow:shadow-algorithm id="shadowAlgorithmName" type="xxx">
  4. <props>
  5. <prop key="xxx">xxx</prop>
  6. </props>
  7. </shadow:shadow-algorithm>

High Availability

  1. <!-- discoveryTypeName is specified by users, and its property has to be consistent with that of discovery-type-name in database discovery rules. -->
  2. <database-discovery:discovery-type id="discoveryTypeName" type="xxx">
  3. <props>
  4. <prop key="xxx">xxx</prop>
  5. </props>
  6. </database-discovery:discovery-type>