GUI / nginx-upstream-dynamic-servers

An nginx module to resolve domain names inside upstreams and keep them up to date.
MIT License
311 stars 74 forks source link

CPU load goes high #34

Open irumman opened 3 years ago

irumman commented 3 years ago

Hi,

I am using this nice module to enable dynamic upstream resolver with keepalive.

Here is my upstream configuration:

resolver 127.0.0.1:8600 ipv6=off valid=1s;
upstream active.vault.service.consul {
    server active.vault.service.consul:8200 resolve max_fails=1 fail_timeout=10s;
    keepalive 512;
    keepalive_requests  1024;
    keepalive_timeout 240s;
}

upstream vault.service.consul {
    server vault.service.consul:8200 resolve max_fails=1 fail_timeout=10s;
    keepalive 512;
    keepalive_requests  1024;
    keepalive_timeout 240s;
}

My Nginx is running in front of Consul which is acting as a dns resolver. The system works fine until I see the following error:

[error] 84#84: upstream-dynamic-servers: 'active.vault.service.consul' could not be resolved (3: Host not found)

Though everything was up during that time, I see the above error and the system cpu goes high to 100% and stuck on that. Is there anything I am missing in the configuration?

Thanks.

starjun commented 3 years ago

nginx plus can use or nginx-upstream-dynamic-servers

nginx plus:https://www.nginx.com/products/nginx/load-balancing/ nginx-upstream-dynamic-servers:https://github.com/GUI/nginx-upstream-dynamic-servers

not free nginx