Java – can spring cloud and ribbon perform DNS based load balancing?

Cloudfoundry plans to add support for DNS a records mapped to multiple IPS (one for each application container instance). Please refer to docs proposal I want to know if spring cloud discovery can support DNS based client load balancing in conjunction with the ribbon

The spring cloud discovery client does not seem to have DNS resolution. It manages host names

The ribbon load balancing library supports the FQDN list through the listofservers property

But I can't find the documents related to the DNS lookup of the specified server: that is, if the DNS A / AAA record (obtained from listofservers) returns multiple IP addresses, will the ribbon load balance between IP addresses?

Where do I need to configure DNS cache instructions? This is Java Does security support JVM scope in, or can I manage it as a client load balancing option (from the ribbon)?

Solution

The ribbon does not perform any DNS lookup. It returns the entry (IP or name) in the serverlist as is

You do not need ribbon for DNS based load balancing; The operating system parser will rotate between the available IP addresses found each time Just make sure that DNS is not cached

For more complex load balancing, you need to resolve DNS to an IP list and pass it to ribbon

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>