pgcat icon indicating copy to clipboard operation
pgcat copied to clipboard

Add Client Connection Limits

Open AndrewJackson2020 opened this issue 5 months ago • 1 comments

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 avatar Sep 06 '24 19:09 AndrewJackson2020