0

I am attempting to do an nginx setup with one frontend VIP and two backend web servers. I want the backend to be active/passive so that all requests go to server #1 unless server #1 is down, then send to server #2. When server #1 comes alive, stay on server #2 until server #2 fails.

is it possible to do so in nginx environment ?

here is my running configuration:

root@proxy-02 ~]# vi /etc/nginx/app.conf

stream {

upstream appset.test {

server 10.2.5.61:443;

server 10.2.5.62:443 backup;

}

server {

listen 443;

proxy_pass appset.test;

}

upstream ssh {

server 10.2.5.61:4422;

server 10.2.5.62:4422 backup;

server {

listen 4422;

proxy_pass ssh;

}

1 Answer 1

0

Perhaps with a commercial version, but if you want to keep your hard earned (insert valuta of choice here), then install keepalived on the backends. Configure nginx as if there is only one backend, referring to the "public" IP of the coupled servers. See keepalived configuration manual

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.