I have 2 ISPs, and a server with two IP addresses, something like this:
eth0: 18.104.22.168 eth1: 22.214.171.124
I have set
www.example.com with two A records, so that I have DNS LB.
App is working fine this way, and Linux box is set with policy based routing to avoid asymmetric routing of connections. Outgoing packets leave through same interface incoming connections were established through.
Now, only problem left is that I have set a single default gateway,
126.96.36.199. I would like to achieve either LB or at least failover for outgoing connections too.
One way I could do it is with cronjob that will ping some host and if ping fails, change the default route to
188.8.131.52, but this method seems way too unreliable.
Any suggestions on how to failover default route?