r2dbc-mysql
r2dbc-mysql copied to clipboard
Add support for multiple hosts configuration
Motivation:
Support for multiple hosts configuration.
Resolves #89
It also resolves #255 because if the user uses multiple hosts we have to resolve the hostname and port ourselves
Modification:
- [x] Refactor
host/unixSocketand addaddHostto configure multiple hosts - [x] Allow to use
Mono.zipfor user and password, because we have to receive and cache credential before we try to connect to multiple hosts - [x] Add multiple hosts connection strategy
- [x] Add HA protocol support for multiple hosts
- [x] Allow to use DNS SRV records for HA protocol, like
r2dbc:mysql+srv:loadbalance://my-db-1,my-db-2/test - [ ] Add
autoReconnect/maxReconnectssupport,FailoverClient - [ ] Add failover events support and description
- [ ] Add reconnection strategy
- [ ] Add get back to primary host for default HA protocol,
queriesBeforeRetrySourceandsecondsBeforeRetrySource
User can only configure one of:
host/portfor a single hostaddHostfor multiple hosts, it will be auto-converted fromConnectionFactoryOptions.HOSTunixSocketfor Unix Domain Socket.
Result:
Support multiple hosts configuration with HA protocol.
Support DNS SRV Records for HA protocol.
@jchrys It is going to be a big feature, so I will mark it to 1.2.0