Readwrite-Splitting

    Notes

    • Support the creation of static readwrite-splitting rules and dynamic readwrite-splitting rules
    • Dynamic readwrite-splitting rules rely on database discovery rules
    • specifies the load balancing algorithm type, please refer to
    • Duplicate ruleName will not be created

    Example

    1. // Static
    2. WRITE_RESOURCE=write_ds,
    3. READ_RESOURCES(read_ds_0,read_ds_1),
    4. TYPE(NAME="random")
    5. // Dynamic
    6. CREATE READWRITE_SPLITTING RULE ms_group_1 (
    7. AUTO_AWARE_RESOURCE=group_0,
    8. WRITE_DATA_SOURCE_QUERY_ENABLED=false,
    9. ALTER READWRITE_SPLITTING RULE ms_group_1 (
    10. WRITE_RESOURCE=write_ds,
    11. READ_RESOURCES(read_ds_0,read_ds_1,read_ds_2),
    12. TYPE(NAME="random",PROPERTIES(write_ds=2,read_ds_0=2,read_ds_1=2,read_ds_2=1))
    13. );
    14. DROP READWRITE_SPLITTING RULE ms_group_1;