Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend Servers wont update (nginx-stream-upsync-module) #8

Open
austinbenincasa opened this issue Oct 8, 2018 · 0 comments
Open

Comments

@austinbenincasa
Copy link

austinbenincasa commented Oct 8, 2018

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant