👋 Hello there and thank you for finch and all the work around! 💚
I'd love some more information/documentation around the pool configuration options.
In particular my question is about pool size vs. pool count on HTTP1.
Like, what's the difference between having a pool size of 200 vs. a pool size of 50 and a pool count of 4 (which would also be 200 total connections). It's unclear to me how to optimize/balance these and am looking for some insight - and at best by updating the docs.
Looking at NimblePool I can gleam this from the downsides:
The downside of NimblePool is that, because all resources are under a single process, any resource management operation will happen on this single process, which is more likely to become a bottleneck. This can be addressed, however, by starting one NimblePool per scheduler and by doing scheduler-based dispatches.
Meaning, the management of resources/checkouts may take too long if one pool was too big. Of course, hard to say what too big means.
I'd also be interested in knowing how a scenario with multiple pools is handled. Like, how is it decided which pool is used? Do we go round robin around the pools?
I think that information in the docs would be really appreciated, at least by me but also by others. Happy to try & write it myself - but for that I'd need to know about it 😅
Background
I don't want to or need you to solve my problem, I know for that I'd go to elixirforum or the slack but I thought it might add some color to the issue for context for what I'm looking for. Feel free to ignore :)
I'm running essentially an "intelligent" proxy and so make a good chunk of HTTP requests. Roughly 180requests/second. Requests take between 50ms and ~2000ms (a small number times out after 15seconds, like 10). Roughly a quarter takes longer than 300ms.
I'm using finch via Req. First on this traffic (predictably) Finch failed with:
Finch was unable to provide a connection within the timeout due to excess queuing for connections. Consider adjusting the pool size, count, timeout or reducing the rate of requests if it is possible that the downstream service is unable to keep up with the current rate.
a couple of hundred times. Using "Little's Law" I estimated a queue size of ~72. Configured the pool size to 80 and count to 3 (so over provisioned a lot as that should give me 240).
Still got ~10 of the above errors (all at the same time) after that change which surprised me - as I thought I had sufficiently over provisioned the pools for the current traffic (I actually thought I configured it safely for ~2x the current traffic).
FWIW this was happening on the tiniest of EC2 instances (1 CPU). CPU% average ~35%/max 71% - Memory below 25%.
I'll bump numbers more but I think more understanding of how pool size, count and scheduling worked would help me. Also, yes I'm working on getting telemetry metrics to see what's wrong 😅
Thank you
Thanks again! 💚

👋 Hello there and thank you for
finchand all the work around! 💚I'd love some more information/documentation around the pool configuration options.
In particular my question is about pool size vs. pool count on HTTP1.
Like, what's the difference between having a pool size of 200 vs. a pool size of 50 and a pool count of 4 (which would also be 200 total connections). It's unclear to me how to optimize/balance these and am looking for some insight - and at best by updating the docs.
Looking at
NimblePoolI can gleam this from the downsides:Meaning, the management of resources/checkouts may take too long if one pool was too big. Of course, hard to say what too big means.
I'd also be interested in knowing how a scenario with multiple pools is handled. Like, how is it decided which pool is used? Do we go round robin around the pools?
I think that information in the docs would be really appreciated, at least by me but also by others. Happy to try & write it myself - but for that I'd need to know about it 😅
Background
I don't want to or need you to solve my problem, I know for that I'd go to elixirforum or the slack but I thought it might add some color to the issue for context for what I'm looking for. Feel free to ignore :)
I'm running essentially an "intelligent" proxy and so make a good chunk of HTTP requests. Roughly 180requests/second. Requests take between 50ms and ~2000ms (a small number times out after 15seconds, like 10). Roughly a quarter takes longer than 300ms.
I'm using finch via Req. First on this traffic (predictably) Finch failed with:
a couple of hundred times. Using "Little's Law" I estimated a queue size of ~72. Configured the pool size to 80 and count to 3 (so over provisioned a lot as that should give me 240).
Still got ~10 of the above errors (all at the same time) after that change which surprised me - as I thought I had sufficiently over provisioned the pools for the current traffic (I actually thought I configured it safely for ~2x the current traffic).
FWIW this was happening on the tiniest of EC2 instances (1 CPU). CPU% average ~35%/max 71% - Memory below 25%.
I'll bump numbers more but I think more understanding of how pool size, count and scheduling worked would help me. Also, yes I'm working on getting telemetry metrics to see what's wrong 😅
Thank you
Thanks again! 💚