envoyproxy/envoy

strict_dns: allow to keep stale targets for a specified amount of time

Open

#15,457 opened on Mar 12, 2021

View on GitHub
 (1 comment) (0 reactions) (0 assignees)C++ (5,373 forks)batch import
area/dnshelp wanted

Repository metrics

Stars
 (27,997 stars)
PR merge metrics
 (Avg merge 8d) (378 merged PRs in 30d)

Description

Problem: When a DNS does not return all targets on each resolve, strict_dns will continually be adding and draining targets. For this case logical_dns is better, but it's still not great, it keeps track of a single logical target even though connections are made to several, for the given resolution interval all connections and traffic will flow to a single IP address, also I really don't know how outlier_detection and other advanced features can play with a logical_dns cluster. original_dst cluster supports cleaning unused targets and be an option, but it's also probably unsafe since it allows connecting to any IP address.

Proposed Solutions:

  • Adding support for cleanup_interval for strict_dns clusters like original_dst does, and remove them when they have not been returned for a given time.
  • Adding a "mixed dns" cluster which supports this sort of behavior.

Contributor guide