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

Actively manage number of open file descriptors #210

Open
3 tasks
droe opened this issue Aug 30, 2018 · 0 comments
Open
3 tasks

Actively manage number of open file descriptors #210

droe opened this issue Aug 30, 2018 · 0 comments
Assignees

Comments

@droe
Copy link
Owner

droe commented Aug 30, 2018

With WebSockets and HTTP/2 there will be more persistent connections. Therefore actively managing the number of open file descriptors is critical. So far we relied on appropriate rlimits set by the user outside of SSLsplit.

Tasks:

  • Look into how the number of open file descriptors scales with the number of concurrent connections in the parent and the child process, respectively; depends also on log settings used
  • Add a «maximum number of concurrent connections» config option and calculate and configure appropriate RLIMIT_NOFILE levels based on the current configuration and a safety margin
  • Refuse connections gracefully when going over the maximum number of concurrent connections limit; this should be implemented in pxy_thrmgr_attach() by summing up the ->load of each thread, and if that's over the connection limit, decline the connection by returning an error (-1)

This approach is more natural to configure than explicit rlimits and does not require requesting the count of open file descriptors at each new connection, with its reliability, portability and performance issues.

@droe droe added the feature label Aug 30, 2018
This was referenced Aug 30, 2018
@droe droe mentioned this issue Sep 4, 2018
4 tasks
@droe droe added the priority label Sep 4, 2018
@droe droe mentioned this issue Sep 4, 2018
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants