HA Proxy - static active/passive failover?

Started by Patrick M. Hausen, January 28, 2022, 05:05:19 PM

Previous topic - Next topic
January 28, 2022, 05:05:19 PM Last Edit: January 28, 2022, 05:06:55 PM by pmhausen
Hi all,

I migrated a TYPO3 cluster from Kemp Loadmaster to OPNsense. The policy mandated by the customer and the application is:

- all requests go to the master server
- only if the master server fails, the requests go to the backup server
- in the rare event that both servers fail, a static "sorry" page from a third system is to be displayed

Currently I have the master set to "active" and the backup set to "backup". This satisfies the first two conditions. Unfortunately reading up in the documentation reveals that "backup" is actually intended to be used for "sorry" pages.

So how can I achieve a static distribution with one node the only active one until it fails? Would setting the weight of the backup node to 0 do the trick? Picking 255 for the master and 1 for the backup will schedule one request out of 256 to the backup, which is not what we need.

Thanks!
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I would probably add multiple backends, one for the "website" and one for the "sorry" site. A rule should be added to the frontend to check the number of usable servers in the "website" backend, and switch to the "sorry" backend when no usable server is available.

That's clever. Thanks.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)