Nginx upstream zone
pluknet at nginx.com
Mon Aug 8 11:34:30 UTC 2022
> On 8 Aug 2022, at 06:49, Sergey A. Osokin <osa at freebsd.org.ru> wrote:
> On Fri, Aug 05, 2022 at 07:40:35PM +0530, Vishwas Bm wrote:
>> What is the use of zone in stream upstream
> Since this is the part of the commercial subscription, I'd recommend
> to contact NGINX Plus premium support team, please visit the following
> page to get details, https://www.nginx.com/support/
And also included in opensource nginx.
>> Does it have any impact on how loadbalancing happens when there are
>> multiple worker process?
> No impact.
Actually, enabling upstream zone moves internal peer state storage
to shared memory, such that loadbalancing becomes consistent among
worker processes. This includes reusing SSL sessions to backends.
>> Also how is the size needs to be calculated ?
>> Is 5m size sufficient for 10 worker process?
> That depends on the actual NGINX Plus configuration and other factors,
> usually 64k is enough, but that number can be revisited with an extensive
> testing in a lower environments.
> Thank you.
It's roughly 500 bytes per upstream server in a simple case.
The exact numbers depend on nginx version and configuration.
Also, currently upstream zone cannot be configured to be less
than 8 page sizes.
More information about the nginx