# Dynamic reverse proxy configuration

**URL:** <https://www.ruby-forum.com/t/dynamic-reverse-proxy-configuration/216928>\
**Category:** NGINX\
**Created:** [February 17, 2012, 4:48am UTC](https://www.ruby-forum.com/t/dynamic-reverse-proxy-configuration/216928 "2012-02-17T04:48:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 17, 2012, 4:48am UTC](https://www.ruby-forum.com/t/dynamic-reverse-proxy-configuration/216928/1 "2012-02-17T04:48:58Z")

</div>

Hi,  
I am currently trying to develop a module that could allow Nginx act  
as a reverse proxy to a cluster of nodes using Zookeeper. I would like  
to ask if it is possible to develop such a module.

I found a question on StackOverflow describing exactly my situation:

> <https://stackoverflow.com/questions/8982717/is-there-any-way-to-configure-nginx-or-other-quick-reverse-proxy-dynamically>

The question is: is there any way to make nginx (or other proxy) read  
its config from Apache ZooKeeper? Or more broader: is there any way to  
effectively switch proxy configuration on fly?

Any suggestion is appreciated 🙂

Posted at Nginx Forum:

> **[Dynamic reverse proxy configuration](https://forum.nginx.org/read.php?2,222519,222519#msg-222519)**
>
> Hi, I am currently trying to develop a module that could allow Nginx act as a reverse proxy to a cluster of nodes using Zookeeper. I would like to ask if it is possible to develop such a module. I found a question on StackOverflow describing exactly...

---

<div class="post-metadata">

**Author:** ![dapicester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f14d63/32.png) [@dapicester](https://www.ruby-forum.com/u/dapicester)\
**Post date:** [February 17, 2012, 9:01am UTC](https://www.ruby-forum.com/t/dynamic-reverse-proxy-configuration/216928/2 "2012-02-17T09:01:30Z")

</div>

I recommend you use the ngx\_lua module

here’s some example ([OpenResty® - Open source](http://openresty.org/#DynamicRoutingBasedOnRedis))

you can change redis to ngx\_lua’s internal dict facility which is shared  
between workers for speed.

and write some location handler to accept outside configuration data and  
save it in ngx\_lua’s dict.

Posted at Nginx Forum:

> **[Re: Dynamic reverse proxy configuration](https://forum.nginx.org/read.php?2,222519,222531#msg-222531)**
>
> Hi, I am currently trying to develop a module that could allow Nginx act as a reverse proxy to a cluster of nodes using Zookeeper. I would like to ask if it is possible to develop such a module. I found a question on StackOverflow describing exactly...

---

<div class="post-metadata">

**Author:** ![dapicester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f14d63/32.png) [@dapicester](https://www.ruby-forum.com/u/dapicester)\
**Post date:** [February 19, 2012, 7:17am UTC](https://www.ruby-forum.com/t/dynamic-reverse-proxy-configuration/216928/3 "2012-02-19T07:17:45Z")

</div>

Thanks for the suggestion, I’ll take a look.

Posted at Nginx Forum:

> **[Re: Dynamic reverse proxy configuration](https://forum.nginx.org/read.php?2,222519,222629#msg-222629)**
>
> Hi, I am currently trying to develop a module that could allow Nginx act as a reverse proxy to a cluster of nodes using Zookeeper. I would like to ask if it is possible to develop such a module. I found a question on StackOverflow describing exactly...
