Skip to content

Load balancing based on dns #1298

Answered by bgrainger
carlokok asked this question in Q&A
Discussion options

You must be logged in to vote

LoadBalance=RoundRobin currently only applies to comma-delimited entries in the Server connection string option; multiple IP addresses for a single host name are tried in order. (However, if Dns.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 name manticore-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 …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by carlokok
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants