Sheng
Sheng

Reputation: 1707

Possibility to skew haproxy?

haproxy is a load balance proxy. However my use case is to make haproxy to direct traffic to server A, and ONLY if server A is down, and haproxy should direct traffic to server B which basically does nothing except displaying a page of "under construction" or "temporarily unavailable" for every coming requests.

Upvotes: 1

Views: 400

Answers (1)

Jimothy
Jimothy

Reputation: 9730

Designate Server B as "backup":

backend backend_servers
    server R1 192.168.1.100:80 maxconn 1000 check
    server R2 192.168.1.101:80 maxconn 1000 backup check

R2 will only get requests if R1 is down.

Upvotes: 3

Related Questions