Reputation: 1707
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
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