akka/akka-http
Vedi su GitHubAkka Http Client pool connections are not reestablished after DNS positive-ttl
Open
#1226 aperta il 23 giu 2017
1 - triageddiscusshelp wantedt:client
Metriche repository
- Star
- (1311 star)
- Metriche merge PR
- (Merge medio 1g 10h) (2 PR mergiate in 30 g)
Descrizione
We have found that under some circumstances, Akka's Http client is not honoring the positive-ttl expiry value, not picking up new DNS entries.
It looks as if under load, and using the default http connection pool, the client will never try resolving again the DNS entry if the connection is not closed, regardless of the positive-ttl value.
Steps to reproduce: 0. Using akka-http 10.0.6 and akka-core 2.5.2
- DNS resolves
test.comtoserver_Awithip_A - Run akka http application with following settings:
dns.inet-address { positive-ttl = 30s negative-ttl = 30s } - Run load continuously to this akka http app which does requests to
test.com - Change DNS entry (in
/etc/hosts, for instance) to point toip_B. NOTE:server_Awithip_Ais still running. - Wait for positive-ttl dns cache expiry (30 seconds, in this example)
Expected behaviour:
- DNS cache expires, every new request should be sent to
ip_B.
Current behaviour:
- New requests after DNS expiry time are still going to
ip_A. - The only way to have the akka http application to pick up the new DNS entry is by restarting.