Description
If one is using the nginx-stream-upsync-module to dynamically update a upstream's backend servers the nginx-module-sts will never recognize the new backend to pull stats from. Stats are properly calculated for the initially defined backend server in servers.conf however any update to the file from the upsync module will not be registered without a nginx restart.
Config File
nginx.conf
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
stream_server_traffic_status_zone;
server {
server_name status;
listen 80;
location /status {
stream_server_traffic_status_display;
stream_server_traffic_status_display_format html;
}
}
}
stream {
server_traffic_status_zone;
upstream backend {
upsync etcd:2379/v2/keys/upstreams/backend upsync_timeout=6m upsync_interval=500ms upsync_type=etcd strong_dependency=off;
upsync_dump_path /etc/nginx/servers.conf;
include /etc/nginx/servers.conf;
}
server {
listen 443;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass backend;
}
}
servers.conf
server 192.168.1.10:443 max_fails=3 fail_timeout=10s;
Description
If one is using the
nginx-stream-upsync-moduleto dynamically update a upstream's backend servers thenginx-module-stswill never recognize the new backend to pull stats from. Stats are properly calculated for the initially defined backend server inservers.confhowever any update to the file from the upsync module will not be registered without a nginx restart.Config File
nginx.conf
servers.conf