Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]Supports Multiple host configuration. #89

Open
tabdelbari opened this issue Apr 13, 2023 · 4 comments · May be fixed by #258
Open

[feature]Supports Multiple host configuration. #89

tabdelbari opened this issue Apr 13, 2023 · 4 comments · May be fixed by #258
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tabdelbari
Copy link

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

@jchrys jchrys changed the title [feature] [feature]Supports Multiple host configuration. Apr 13, 2023
@jchrys
Copy link
Collaborator

jchrys commented Apr 13, 2023

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

@jchrys jchrys added the enhancement New feature or request label Apr 13, 2023
@jchrys jchrys self-assigned this Apr 13, 2023
@tabdelbari
Copy link
Author

Thank you so much @jchrys

@jchrys jchrys added this to the 1.0.2 milestone Apr 27, 2023
@jchrys jchrys modified the milestones: 1.0.2, 1.0.3 May 30, 2023
@mobidick1969 mobidick1969 self-assigned this Jun 17, 2023
@jchrys jchrys removed this from the 1.0.3 milestone Sep 11, 2023
@mirromutth mirromutth self-assigned this Mar 5, 2024
@mirromutth
Copy link
Contributor

mirromutth commented Mar 11, 2024

It requires following tasks:

  1. Connection strategy when creating the connection
  2. DNS SRV Records support: https://dev.mysql.com/doc/refman/8.0/en/connecting-using-dns-srv.html
  3. Reconnection strategy: autoReconnect/maxReconnects/reconnectAtTxEnd/initialTimeout option. It should be reconnected only if the connection is in auto-commit mode (not in a transaction).
  4. If 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 occurs
  5. retriesAllDown option or alternative. If the connection fails for all hosts/addresses, whether to retry them all

These we should not consider:

  • Replication mode: io.r2dbc.spi.Connection cannot be set to a read-only connection, so this mode will always use the first host/address
  • failOverReadOnly option: same reason as above
  • autoReconnectForPools option: force reconnect even the connection is in a transaction or autoCommit=false. Not sure it is necessary
  • retriesAllDown default value 120: Too big? The interval between all retries is 250ms, so it takes at least 30s to fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants