-
|
I have a kubernetes cluster with manticore inside it (which uses mysql as a protocol); I couldn't find from the docs but does mysqlconnector allow me to do something like:
Where it would connect to either 10.240.0.38 or 10.240.0.19 (in this case), instead of hardcoding the addresses (not an option since they can change any any moment) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
So it will "connect to either 10.240.0.38 or 10.240.0.19 (in this case)", but it may prefer to make all connections to 10.240.0.38 based on the behaviour of |
Beta Was this translation helpful? Give feedback.
-
|
Cool. Since ping picks a different instance every connection, i could just let it do that automatically then. I'll play with this, thanks! |
Beta Was this translation helpful? Give feedback.
LoadBalance=RoundRobincurrently only applies to comma-delimited entries in theServerconnection string option; multiple IP addresses for a single host name are tried in order. (However, ifDns.GetHostAddressesreturns the IP addresses in a different order each time it's invoked by MySqlConnector, then MySqlConnector will end up alternating between them.)DnsCheckInterval=5will cause the connection pool to be cleared (and new connections to be made) if the host namemanticore-manticoresearch-worker-svcever resolves to a different set of IP addresses.So it will "connect to either 10.240.0.38 or 10.240.0.19 (in this case)", but it may prefer to make all connections to 10.240.0.38 based …