Skip to content

Conversation

u5surf
Copy link
Contributor

@u5surf u5surf commented Sep 30, 2025

Assistance Disclosure

No AI was used.

Fixes: #7277

Introducing new usagePool named inflightHosts which store the host is still in-flight upstream in reverse proxy Cleanup phase. and when proxyLoopIteration returns done, the inflightHost drain in the usagePool.
Here is scope for improvement because it is draft status now.

if done {
// Iterate over the upstream pool (needs to be fast)
var rangeErr error
inflightHosts.Range(func(key, val any) bool {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would like to Get by key methods simply sounds like this instead Range

val := inflightHosts.Get(reqHost)
host, ok := val.(*Host)
...
if host.NumRequests() == 0 {
	inflightHosts.Delete(reqHost)
}

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.

/reverse_proxy/upstreams - all in-flight requests
1 participant