If my program connects only to a single origin, is there a difference between max_concurrent_requests
and pool_options.max_connections_per_origin
?
#68
-
The question is in the title. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, "max connections per origin" will be the maximum number of connections, in a given pool/session, connecting to an origin, I.e. if you use the same session across N threads (sidekiq workers for example), and N > max connections per origin M, if at a given point M workers are busy waiting on a response from the origin, the M + 1 worker will wait for one of them to be released before proceeding (or time out is reached). Max concurrent requests is for the number of simultaneous requests you can send at once on 1 connection; this only is taken into account if requests can be sent concurrently, I.e. in HTTP/2 they can be mhltiplexed, in HTTP/1 they can be pipelined. Hope that clarifies. |
Beta Was this translation helpful? Give feedback.
Hi, "max connections per origin" will be the maximum number of connections, in a given pool/session, connecting to an origin, I.e. if you use the same session across N threads (sidekiq workers for example), and N > max connections per origin M, if at a given point M workers are busy waiting on a response from the origin, the M + 1 worker will wait for one of them to be released before proceeding (or time out is reached).
Max concurrent requests is for the number of simultaneous requests you can send at once on 1 connection; this only is taken into account if requests can be sent concurrently, I.e. in HTTP/2 they can be mhltiplexed, in HTTP/1 they can be pipelined.
Hope that clarifies.