Readwrite-splitting

Configuration Item Explanation

  1. dataSource: # Omit the data source configuration, please refer to the usage
  2. rules:
  3. - !READWRITE_SPLITTING
  4. dataSources:
  5. <data-source-name> (+): # Logic data source name of readwrite-splitting
  6. writeDataSourceName: # Write data source name
  7. readDataSourceNames:
  8. - <read-data-source-name> (+) # Read data source name
  9. loadBalancerName: # Load balance algorithm name
  10. # Load balance algorithm configuration
  11. loadBalancers:
  12. <load-balancer-name> (+): # Load balance algorithm name
  13. type: # Load balance algorithm type
  14. props: # Load balance algorithm properties
  15. # ...
  16. props:
  17. # ...

Please refer to Built-in Load Balance Algorithm List for more details about type of algorithm. Please refer to Use Norms for more details about query consistent routing.