Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

How to have a primary and a backup server and switch them?

$
0
0

@jlecour wrote:

Hi,

I am in a situation where I have a backend with a main server A and a backup server B.
The intention is to have 100% of requests served by server A, and fallback to the server B if A is failing.

But I’d like to be able to switch the roles of the servers. Server B should them serve all the requests and the server A should become the backup i case of B failing.

I don’t want disable server A in HAproxy for it to use server B. because I still want the fallback to be possible.

I’ve found a weird option : having my 2 different configurations and a symlink to one of them to tell wich one HAProxy should use. But it forces me to reload the configuration each time I want to switch, and to maintain 2 different files.

I’ve search in the API and I’ve found my settings I can change (weight…) but nothing about the “backup” attribute of a server.
Also I didn’t find an algorithme which would do this automatically.

Anyone have an idea to solve this use case?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>