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

fix: resource leak? We're not using SetDeadline for UDP #3

Open
WofWca opened this issue Sep 24, 2024 · 0 comments
Open

fix: resource leak? We're not using SetDeadline for UDP #3

WofWca opened this issue Sep 24, 2024 · 0 comments

Comments

@WofWca
Copy link
Owner

WofWca commented Sep 24, 2024

Does it mean that UDP "connections" are kept indefinitely? For the server it is potentially critical because it appears that just one client can exhaust all outgoing UDP ports of the server.
It's not about just memory because there are only 65535 ports, and we can probably handle that many pieces of state, memory-wise.

Is it the same for TCP?

But even with SetDeadline, there is nothing stopping the client from just keeping the connections alive?

I guess this is similar to how SOCKS proxies work? They also face a lot of parallel TCP connections, per client.

Adding Prometheus metrics would be nice.

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

No branches or pull requests

1 participant