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

Add Client Connection Limits #802

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

AndrewJackson2020
Copy link
Contributor

@AndrewJackson2020 AndrewJackson2020 commented Sep 6, 2024

This PR adds client connection limits to pgcat. This is an important feature because pgcat will start to show undefined behavior once the number of client connections exceeds the number of max file descriptors set at the OS level (1024 by default on most distros). The absence of this feature means that any user that has access to the pgcat instance can essentially DoS the connection pooler by just opening connections until the max file descriptors limit is reached.

Specifically this PR implements client connection limits at the user level and at the pgcat instance level. I am open to separating this into 2 separate PR's (1 for the instance level and one for the user level) but they are highly related sets of functionality and if the system level one were to be merged without the user level one it would mean any one user still has the ability to DoS the connection pooler and deny access to other clients by just maxing out the number of instance level connections.

This solves issue #799.

@AndrewJackson2020 AndrewJackson2020 changed the title add client connection limits Add Client Connection Limits Sep 6, 2024
@AndrewJackson2020
Copy link
Contributor Author

@drdrsh Thanks for merging #805 , any chance you can take a look at this one as well? This one is similar in that it does not require any changes to the docker environment/CI and has no breaking changes.

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.

1 participant