0

I have a situation where I have 2 HAProxy load balancers, say LAP1 and LAP2. And I have two servers, say S1 and S2 behind LAP1 and s3, s4 behind LAP2. My question is that if S1, S2 goes down, all the traffic coming to LAP1 will be redirected to LAP2.

Any help will be much appreciated. If you could pin point me to any specific docs it will be very helpful.

Thanks.

curiousguy
  • 115
  • 7

2 Answers2

1

To do what you specifically ask for just add lap2 as a backup server to the backend on lap1. However it sounds like what you are trying to do is probably not the best way to go about it.

JamesRyan
  • 8,166
  • 2
  • 25
  • 36
0

Have you tried adding the other haproxy server to the list of backend servers (ideally in failover mode)?

Daniel Widrick
  • 3,488
  • 2
  • 13
  • 27
  • We are not looking for failover mode. Let me explain you the steps. a) user will access LAP1 b) request goes to s1 or s3 c) s1 or s3 redirects the requests to LAP2. What we want is that if LAP1 is down all the requests coming to LAP1 will be redirected to LAP2 by the load balancer itself, i.e. when health check at LAP1 fails. – curiousguy Sep 26 '13 at 10:21