Repository navigation
Refresh expired resolved endpoints instead of evicting them - #6617
Merged
Merged
Conversation
Motivation: The endpoint resolver evicts an endpoint reaching the max keep alive time, even when the endpoint is in active use. The next request resolves the address again on the request path: requests to this origin wait for the resolution, and a resolution failure is reported to them although the client held a valid endpoint. For a busy HTTP client this happens by default every 5 minutes (#6612). Changes: When a non idle endpoint reaches the max keep alive time, resolve the address in the background and atomically replace the managed endpoint with a new one holding the resolved state, the current endpoint remaining in use until then. The managed endpoint lifecycle becomes a single state field (active/refreshing/disposed) and a failed background resolution evicts the endpoint. Idle endpoints are evicted as before. ResourceManager gains a replace operation substituting a mapped resource. Assisted-by: Anthropic Claude (claude-fable-5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Julien Viet <julien@julienviet.com> (cherry picked from commit 59d81a6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
The endpoint resolver evicts an endpoint reaching the max keep alive time, even when the endpoint is in active use. The next request resolves the address again on the request path: requests to this origin wait for the resolution, and a resolution failure is reported to them although the client held a valid endpoint. For a busy HTTP client this happens by default every 5 minutes (#6612).
Changes:
When a non idle endpoint reaches the max keep alive time, resolve the address in the background and atomically replace the managed endpoint with a new one holding the resolved state, the current endpoint remaining in use until then. The managed endpoint lifecycle becomes a single state field (active/refreshing/disposed) and a failed background resolution evicts the endpoint. Idle endpoints are evicted as before. ResourceManager gains a replace operation substituting a mapped resource.
Assisted-by: Anthropic Claude (claude-fable-5)
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Signed-off-by: Julien Viet julien@julienviet.com
(cherry picked from commit 59d81a6)