The stream_upstream_dynamic module can be modifies the upstream server without need of restarting nginx.
This module is still under early development and is still experimental.
stream {
resolver 127.0.0.1:5353;
upstream upstest {
zone ups_dyn 3m;
server_resolver;
server www.test.com:8081;
}
server {
listen 8080;
proxy_pass upstest;
}
}
syntax: server_resolver
default: no
context: upstream
Specify this upstream server will be monitors changes of the IP addresses that correspond to a domain name of the server, and automatically modifies the upstream.
In order for this parameter to work, the resolver
directive must be specified in the stream block.
wenqiang li(vislee)
This module is licensed under the BSD license.
Copyright (C) 2018, by vislee.
All rights reserved.