Repository navigation
Replies: 2 comments
|
We did a test, though DNS response was changed (dig/nslookup), we continued to see request going to old region. Is there something similar to |
|
An existing connection can keep sending requests to the old ALB after DNS changes. DNS is consulted when opening a connection; it doesn't move an established TCP connection to the new address. In your configuration, For a sequential diagnostic, try disabling idle connection retention on the inner transport: limits = httpx.Limits(
max_connections=100,
max_keepalive_connections=0,
)
transport = httpx.HTTPTransport(http2=True, limits=limits)
retry_transport = RetryTransport(retry=retries, transport=transport)Pass that transport to your client as before. Put the setting on HTTPX has no equivalent I checked the pooling behavior with HTTPX 0.28.1/httpcore 1.0.9, two local HTTP/1.1 servers, and controlled resolver answers and clock. Repeated requests reused the old address for 135 simulated seconds with a 60-second idle expiry; after 61 seconds idle, the next request resolved the new address. Disabling idle retention or replacing the client also switched addresses. That doesn't test your ALB, OS DNS cache, HTTP/2 or retry wrapper. Codex-assisted. |
Uh oh!
There was an error while loading. Please reload this page.
We are creating a session as below
and then using it in post
Need help knowing that if
qal.api.example.comfailover to another ALB due to region failover (DNS TTL=15 second), will the session created during class initialization (self.session = self._create_session() in new or init) honour the change in DNS response or it will continue to use connection and dns response that was created during initialization.All reactions