Open tabdelbari opened 1 year ago
Hello, @tabdelbari. Thank you for bringing this feature request to our attention. I'll be taking up the task to work on implementing multiple host configurations.
Considering that the R2DBC SPI already supports multiple hosts, it would be beneficial for our project to have this feature as well.
Similar requests have been made in the past, and there's a clear demand for this feature
Thank you so much @jchrys
It requires following tasks:
autoReconnect
/maxReconnects
/reconnectAtTxEnd
/initialTimeout
option. It should be reconnected only if the connection is in auto-commit mode (not in a transaction).secondaryBeforeRetrySource
or requestsBeforeRetrySource
is set, the default (no name) high availability mode will attempt to return the first host/address even if no communication exception occursretriesAllDown
option or alternative. If the connection fails for all hosts/addresses, whether to retry them allThese we should not consider:
io.r2dbc.spi.Connection
cannot be set to a read-only connection, so this mode will always use the first host/addressfailOverReadOnly
option: same reason as aboveautoReconnectForPools
option: force reconnect even the connection is in a transaction or autoCommit=false
. Not sure it is necessaryretriesAllDown
default value 120: Too big? The interval between all retries is 250ms, so it takes at least 30s to fail
Is your feature request related to a problem? Please describe. The probleme is that tve driver doesn't support multiple host configuration
Describe the solution you'd like support multiple hosts configuration, for example: r2dbc:mysql//host1,host2/db