高可用

    1. databaseName: database_discovery_db
    2. dataSources:
    3. ds_0:
    4. url: jdbc:mysql://127.0.0.1:33306/primary_demo_ds?serverTimezone=UTC&useSSL=false
    5. username: root
    6. password:
    7. connectionTimeoutMilliseconds: 3000
    8. idleTimeoutMilliseconds: 60000
    9. maxLifetimeMilliseconds: 1800000
    10. maxPoolSize: 50
    11. minPoolSize: 1
    12. ds_1:
    13. url: jdbc:mysql://127.0.0.1:33307/primary_demo_ds?serverTimezone=UTC&useSSL=false
    14. username: root
    15. password:
    16. maxLifetimeMilliseconds: 1800000
    17. maxPoolSize: 50
    18. minPoolSize: 1
    19. ds_2:
    20. url: jdbc:mysql://127.0.0.1:33308/primary_demo_ds?serverTimezone=UTC&useSSL=false
    21. username: root
    22. password:
    23. connectionTimeoutMilliseconds: 3000
    24. idleTimeoutMilliseconds: 60000
    25. maxLifetimeMilliseconds: 1800000
    26. maxPoolSize: 50
    27. minPoolSize: 1
    28. rules:
    29. - !READWRITE_SPLITTING
    30. dataSources:
    31. replica_ds:
    32. dynamicStrategy:
    33. - !DB_DISCOVERY
    34. dataSources:
    35. readwrite_ds:
    36. dataSourceNames:
    37. - ds_0
    38. - ds_1
    39. - ds_2
    40. discoveryHeartbeatName: mgr_heartbeat
    41. discoveryTypeName: mgr
    42. discoveryHeartbeats:
    43. mgr_heartbeat:
    44. props:
    45. keep-alive-cron: '0/5 * * * * ?'
    46. discoveryTypes:
    47. mgr:
    48. type: MySQL.MGR
    49. props: