Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query on how envoy utilizes the existing connections or creating a new connection #37004

Open
sakatkoori opened this issue Nov 6, 2024 · 3 comments
Labels
area/upstream question Questions that are neither investigations, bugs, nor enhancements

Comments

@sakatkoori
Copy link

Need help in understanding when envoy creates a new connection towards upstream or reuse the existing connection.

We have a scenario, where the connection is idle for some random time and when a new request comes to connect to upstream then envoy is reusing the port which belongs to the earlier idle connection then we are seeing the issue istio/istio#38982

So, wanted to understand when will create a new connection towards upstream and when will reuse the connection.

@sakatkoori sakatkoori added the triage Issue requires triage label Nov 6, 2024
@shreemaan-abhishek
Copy link

I'm interested too.

@KBaichoo
Copy link
Contributor

KBaichoo commented Nov 6, 2024

Upstream = collection of endpoints

For a given endpoint, envoy will open a new connection if there's no available connection with capacity for a request. A connection has capacity if it can take a new stream (http request - response) on it. Draining connections are not considering as having capacity.

envoy is reusing the port which belongs to the earlier idle connection then we are seeing the issue

What port is envoy re-using, the source port? It's entirely possible this might be related to having different time_waits between the system(s) communicating.

@KBaichoo KBaichoo added question Questions that are neither investigations, bugs, nor enhancements area/upstream and removed triage Issue requires triage labels Nov 6, 2024
@sakatkoori
Copy link
Author

@KBaichoo Thanks for the response, yes, source port is being reused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/upstream question Questions that are neither investigations, bugs, nor enhancements
Projects
None yet
Development

No branches or pull requests

3 participants