You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.
Hi Brianc,
I have just a concern about how to specify the max size (min size) of Pool, mean an optimal number.
I know it depends on the server configuration, but can you give me some hints.
Thanks
The text was updated successfully, but these errors were encountered:
phongyu
changed the title
How can specify an optimal number for the max size of Pool
How to specify an optimal number for the max size of Pool
Sep 15, 2017
Hi, this is more difficult than it seems, so I would like to contribute a simple formula to get a very rought approximation:
Suppose you have 50 requests per second, and each request lasts for 0.2 seconds (200 milliseconds). If you set max size of pool to 1, after 1 second you would handle just 5 requests, leaving the other 45 requests still unhandled. Instead you can do something like this:
50 requests per second * 0.2 seconds per request = 10 connections needed in parallel to handle the load (i.e. set max size of pool to this value, 10 in this example)
Some caveats:
Your requests may be too short (under 1 millisecond), or maybe you have less than one request per second. It's ok to set max pool size to 1 or 2 for those.
Your requests may be too short (under 1 millisecond) and you have thousands of requests per second, and they mostly retrieve the same value again and again: add some sort of memory cache to your application (I actually do this for an IoT server handling thousands of inserts per second, most of them duplicate inserts because of m2m packet loss).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Brianc,
I have just a concern about how to specify the max size (min size) of Pool, mean an optimal number.
I know it depends on the server configuration, but can you give me some hints.
Thanks
The text was updated successfully, but these errors were encountered: