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

minimal connections #10

Open
domenkozar opened this issue May 15, 2020 · 2 comments
Open

minimal connections #10

domenkozar opened this issue May 15, 2020 · 2 comments

Comments

@domenkozar
Copy link

As creating postgresql connection created postgresql worker, opening and closing them is expensive.

https://www.pgbouncer.org/ allows specifying the minimum open connections for that reason and it would be great if hasql-pool can do the same.

@roberth
Copy link
Contributor

roberth commented May 15, 2020

@domenkozar hasql-pool is mostly a "facade interface" for resource-pool, which doesn't seem to support this. I don't think this is a problem because of the timeout. Process creation is expensive compared to some other small things, but because of the timeout it should be bounded by, worst case, limit / timeout, e.g. 1 connections/s on average if you have 10s timeout and a limit of 10 connections. Please prove me wrong by adding ekg support to resource-pool ;)

@domenkozar
Copy link
Author

domenkozar commented Dec 29, 2020

Proved in https://qnikst.brick.do/2020-12-28-resource-pool, for upstream issue follow bos/pool#35

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