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

Shrink connection pool under low load #20

Open
mick-h opened this issue Nov 6, 2014 · 2 comments
Open

Shrink connection pool under low load #20

mick-h opened this issue Nov 6, 2014 · 2 comments

Comments

@mick-h
Copy link

mick-h commented Nov 6, 2014

Load testing in a Play app showed that once the pool opens new connections to deal with the load, it does not close them when the load abates. To load test I used siege:
siege -c 200 -t 3m http://localhost:10000/...

and to view open connections I use lsof:
watch -n 5 "sudo lsof | grep rethink | grep 28015"

@kclay
Copy link
Owner

kclay commented Nov 22, 2014

What sort of features/configurable should this have?

@mick-h
Copy link
Author

mick-h commented Nov 23, 2014

In terms of config, starting pool size, minimum pool size, maximum open connections. In terms of logic, begin with starting pool size connections open. As connections are borrowed, if the number of available connections drops below minimum pool size connections, start creating new ones, up until maximum open connections. When connections are returned to the pool, if the pool size is larger than starting pool size, close the connections. That would be my approach.

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

2 participants