# Configuring multiple nginx workers

**URL:** <https://www.ruby-forum.com/t/configuring-multiple-nginx-workers/244857>\
**Category:** NGINX\
**Created:** [June 27, 2016, 5:17pm UTC](https://www.ruby-forum.com/t/configuring-multiple-nginx-workers/244857 "2016-06-27T17:17:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [June 27, 2016, 5:17pm UTC](https://www.ruby-forum.com/t/configuring-multiple-nginx-workers/244857/1 "2016-06-27T17:17:07Z")

</div>

Hi Gurus,

I am looking to develop a discovery service feature on top of nginx.  
I have read [Redirecting…](http://www.aosabook.org/en/nginx.html) and I have a couple  
questions  
based on what I’ve seen in the code base.

If I have multiple workers configured using a single servers as an  
endpoint.  
I want to leverage the ngx\_http\_upstream\_init\_main\_conf functions to do  
the connection pooling for my service.

I see there is some mutex locking commented out in the code. What I want  
to confirm is if I have 2 or more workers configured, each worker has  
its own memory allocation for ngx\_http\_upstream\_main\_conf\_t \*umcf =  
conf; Thus we don’t have to do any mutex locking between the separate  
worker processes. Each worker will have a pooled set of connections to  
the same endpoint.

Is my understanding correct?

Any help is greatly appreciated.

Charles
