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

Bypass maintenance page

$
0
0

@max wrote:

Hello there!

I’m looking for a way to bypass the maintenance page on a backend (when all servers are in maintenance mode).

The solution we found is using force-persist but it doesn’t work without use-server.
And this last option doesn’t enable us to use/test load balancing while in maintenance.

The documentation doesn’t mention that force-persist need to be used with use-server or any other option.
But it tells that it works on frontend, backend and listen which, I assume, means force-persist support other options.

Any idea how to achieve this with force-persist or something else?
What is the exhaustive list of options which can be combined with force-persist?

Our bypass conditions are requests coming from some IPs or having a cookie set to true.
(the bypass can be disabled by the clients using an authorized IP with to the cookie set to false)

Here a testing configuration:

defaults
    mode http
    option httpclose
    option redispatch
    option abortonclose

frontend http
    bind *:80
    bind *:443 ssl no-sslv3 crt /etc/pki/tls/certs/app.example.org.pem
    use_backend app

backend app
    server app-01 app-01:80 maxconn 50 check slowstart 30s
    server app-02 app-02:80 maxconn 50 check slowstart 30s
    option httpchk GET /healthcheck HTTP/1.1\r\nHost:\ app.example.org
    errorfile 503 /data/shared/maintenance/http/503.http
    force-persist if { always_true }

When all the servers are disabled, this configuration doesn’t bypass the maintenance page.
We still get the 503.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4718

Trending Articles



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