You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does org.asynchttpclient.connectionTtl need to be changed from -1 for a connection to be dropped from the pool after a DNS change if there are frequent enough requests?
#1923
We have a situation where have very regular traffic through our AHC client to a particular endpoint. It appears that if the endpoint we are routing to has a dns change (e.g. it starts resolving to a new IP due to a failover scenario), the connection in the pool using the old IP is never dropped even if all HTTP responses are errors (502's).
Setting org.asynchttpclient.connectionTtl to something other than -1 addresses this, but just wanted to check if there are other options. Ideally we want to see it something close to the DNS TTL (e.g. 30000 for 30 seconds) but am concerned that there could be a performance impact from restablishing connections so frequently. Wasn't sure if there was, say, any AHC configuration to drop a connection after N consecutive failed responses. I didn't see any in ahc-default.properties.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have a situation where have very regular traffic through our AHC client to a particular endpoint. It appears that if the endpoint we are routing to has a dns change (e.g. it starts resolving to a new IP due to a failover scenario), the connection in the pool using the old IP is never dropped even if all HTTP responses are errors (502's).
Setting org.asynchttpclient.connectionTtl to something other than -1 addresses this, but just wanted to check if there are other options. Ideally we want to see it something close to the DNS TTL (e.g. 30000 for 30 seconds) but am concerned that there could be a performance impact from restablishing connections so frequently. Wasn't sure if there was, say, any AHC configuration to drop a connection after N consecutive failed responses. I didn't see any in ahc-default.properties.
Beta Was this translation helpful? Give feedback.
All reactions