M
M
Maxim2019-12-12 15:40:51
Nginx
Maxim, 2019-12-12 15:40:51

Can Nginx add upstream dynamically?

Greetings comrades.
Tell me, does Nginx or its brother Nginx+ have the ability to add upstream on the fly without restarting the service?
There is a wild need to do this, and judging by the Nginx + documentation, it can only add servers to an already created upstream.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Shumov, 2019-12-12
@inoise

Can not. You need at least a re-reading of the configuration

D
Dmitry, 2019-12-12
@q2digger

You can use the consul + consul template bundle, you can throw the address and port of the new upstream into the consul, consul-template sees this, rolls out a new config according to the template and reloads nginx.
Doka https://github.com/hashicorp/consul-template

4
440hz, 2019-12-13
@440hz

can use the module
https://github.com/yzprofile/ngx_http_dyups_module
in production. no complaints.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question