Nginx Opensource API feature?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Nginx Opensource API feature?

vergil
Hi..

I am looking for APIs on Nginx Opensource. To monitor, get status and
dynamic configuration of nginx.conf files.

Does the opensource version has it, please confirm?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,288402,288402#msg-288402

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

RE: Nginx Opensource API feature?

Reinis Rozitis
> I am looking for APIs on Nginx Opensource. To monitor, get status and
> dynamic configuration of nginx.conf files.
>
> Does the opensource version has it, please confirm?

For the os version there is stub status module http://nginx.org/en/docs/http/ngx_http_stub_status_module.html

There are several 3rd party modules (like nginx-module-vts) which give more detailed statistics about upstreams/requests (https://www.nginx.com/resources/wiki/modules/)

Depending on your needs for dynamic configuration you might look also at Unit (https://unit.nginx.org/configuration/#configuration-mgmt )


rr

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: RE: Nginx Opensource API feature?

vergil
Thanks for your inputs..

I will go through the APIs provided in the wiki/modules.

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

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

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

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,288402,288409#msg-288409

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

RE: RE: Nginx Opensource API feature?

Reinis Rozitis
> 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

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: RE: RE: Nginx Opensource API feature?

vergil
Thanks rr!!

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,288402,288424#msg-288424

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx