dns_orderconfiguration option contains
LASTand DNS resolution for a service temporarily fails, Kong reverts to using the value of the last successful resolution attempt. In my environment, Kong relies on A and SRV records via Consul DNS to provide IP address and port information for a service. If resolution of a SRV record temporarily fails but the A record succeeds, Kong reverts to routing that particular service to the correct IP address but incorrect port, usually 80. If this occurs, use of
LASTseems to prevent Kong from attempting DNS resolution for the service again, even after the TTL expires for any DNS records. The only solution for this issue involves restarting Kong. In my opinion, Kong should continue to attempt DNS resolution for a service.
If more than three instances of a service exist, Kong only receives DNS records for three of them. Thus, Kong only adds routes for three of them. After the TTL expires, Kong should perform DNS resolution again which usually returns a different set of values. If these values differ from the existing values, does Kong update routing for the service to use the new values?
If more than three instances of a service exist, the documentation suggests running enough instances of Kong to resolve all of the service instances. For example, six instances of a service requires two instances of Kong to resolve all of the DNS records. However, DNS resolution returns random values, so how does running two instances of Kong guarantee routing to all six instances of a service?