To my haproxy i redirect the traffic to single server in backend, i need set another server what work only in case of failure of first server, it's possible? I read the guide, but in balance algorithm don't have found any answer

  • haproxy is used for load balancing it assumes all backends will normally be operational. I think what you are trying to do is setup failover. – Aditya K Apr 10 '15 at 15:24
  • So it's not possible? – hellb0y77 Apr 10 '15 at 15:30
  • I dont know enough about haproxy to provide an authoritative answer, but I'm guessing not. You might want to look at Corosync / Pacemaker instead if you are sure you want a failover cluster rather than a load balanced cluster. – Aditya K Apr 10 '15 at 15:33
  • Use haproxy because in the future i plan to have more servers to balance, now i only need one – hellb0y77 Apr 10 '15 at 15:44

Yes it's possible, i set a backup server adding backup after check like this:

backend test
 server 01 check
 server 02 check backup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.