-
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=RoundRobin
currently only applies to comma-delimited entries in theServer
connection string option; multiple IP addresses for a single host name are tried in order. (However, ifDns.GetHostAddresses
returns the IP addresses in a different order each time it's invoked by MySqlConnector, then MySqlConnector will end up alternating between them.)DnsCheckInterval=5
will cause the connection pool to be cleared (and new connections to be made) if the host namemanticore-manticoresearch-worker-svc
ever 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 …