This module can be used to update your upstream-list without reloadding Nginx.
TODO: It can not work with common `nginx_upstream_check_module`.
The module is not compiled into Tengine by default. It can be enabled with '--with-http_dyups_module'
configuration parameter, and enabled lua support with '--with-http_dyups_lua_api'.
But it can not be compiled as a '.so'.
This directive set the interface location where you can add or delete the upstream list. See the section of Interface for detail.
Syntax: _dyups_read_msgtimeout time
This directive set the interval of workers readding the commands from share memory.
Syntax: _dyups_shm_zonesize size
This directive set the size of share memory which used to store the commands.
Syntax: _dyups_upstreamconf path
This directive set the path of file which you dumped all of upstreams' configs, it will be loaded in
init process after process respwan to restore upstreams.
Syntax: _dyupstrylock on | off
You will get a better prefomance but it maybe not stable, and you will get a '409' when the update request conflicts with others.
/detailget all upstreams and their servers
/listget the list of upstreams
/upstream/namefind the upstream by it's name
/upstream/nameupdate one upstream
/upstream/namedelete one upstream
Call the interface, when you get the return code is
HTTP_INTERNAL_SERVER_ERROR 500, you need to reload nginx to make the Nginx work at a good state.
If you got
HTTP_CONFLICT 409, you need resend the same commands again latter.
The /list and /detail interface will return
HTTP_NO_CONTENT 204 when there is no upstream.
Other code means you should modify your commands and call the interface again.
ATTENEION: You also need a
third-party to generate the new config and dump it to Nginx'conf directory.
you should add the directive
dyups_interface into your config file to active this feature