Nginx Opensource API feature?

Reinis Rozitis r at roze.lv
Fri Jun 19 19:05:16 UTC 2020


> Can Unit be used as a reverse proxy server like what we do with Nginx?

It can.
 
> I want to update my Nginx reverse proxy server dynamically (&
> automatically) without any downtime, whenever the underlying services
> scale up & down automatically.

In general nginx reloads configuration gracefully, so one option is just to write the config files with an application/script and do reloads.

Another way is to find appropriate module which allows dynamic upstream changes or for example there are modules which allow backends to be determined via dns (nginx itself can also use host based upstreams but in a more static way as the dns resolution is done only on startup and config reload (there are some hacks with variables but it's not as elegant)).

Next level would be to use Openresty and something like https://github.com/openresty/lua-nginx-module/#balancer_by_lua_block where you can do whatever comes into your mind (as far you learn to code Lua a bit).


> I understand that with nginx +  it is possible with the support of APIs it
> provides. I am looking for a complete opensource solution.

Yes, the commercial version has inbuilt dynamic backend change feature.

rr



More information about the nginx mailing list