Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honor networkaddress.cache.ttl to allow DNS refreshes #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blakeney
Copy link

Currently, FHttp uses a permanent cache of DNS lookups, which causes problems when applications are pointed at DNS entries whose values are subject to change (for example, AWS Elastic Load Balancers).

This issue has affected Finagle generally, as discussed here. A fix went into Finagle last year. However, the hosts() method of ClientBuilder, which is used by FHttp, does not take advantage of the fix.

With the change in this Pull Request, FHttp will use a Finagle resolver that refreshes DNS entries on a timer if the Java Security property networkaddress.cache.ttl is set to a positive value. If that property is negative or unset, FHttp will behave as it currently does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant