I'm building DC (aka Availability Zone) fault-tolerant setup with fabio, consul and ECS on AWS. I'm using active-active setup with separate consul cluster (3 nodes each) per DC.
In this setup I have multiple fabio instances behind ELB and services are running in both DC's at the same time. ELB uses round robin to spread load across fabio instances and it uses fabio http port for healthcheck.
The problem here is that in case of DC outage I can't be sure all services are running in each DC, so I would like fabio to be multi-DC aware and spread load across DC's, so I would have my service available even if it's not running in some DC.
I've implemented proof-of-concept in my fork (https://github.com/LibertyGlobal/fabio), it's hardcoded and ugly but it works. Idea is to create multiple goroutines with blocking query for each consul DC and when blocking query is over to query rest of datacenters and create config.
I can make a better version of that if I know that it can be accepted to upstream. @magiconair are you interested in such feature in fabio or I'm doing it wrong?
I'm building DC (aka Availability Zone) fault-tolerant setup with fabio, consul and ECS on AWS. I'm using active-active setup with separate consul cluster (3 nodes each) per DC.
In this setup I have multiple fabio instances behind ELB and services are running in both DC's at the same time. ELB uses round robin to spread load across fabio instances and it uses fabio http port for healthcheck.
The problem here is that in case of DC outage I can't be sure all services are running in each DC, so I would like fabio to be multi-DC aware and spread load across DC's, so I would have my service available even if it's not running in some DC.
I've implemented proof-of-concept in my fork (https://github.com/LibertyGlobal/fabio), it's hardcoded and ugly but it works. Idea is to create multiple goroutines with blocking query for each consul DC and when blocking query is over to query rest of datacenters and create config.
I can make a better version of that if I know that it can be accepted to upstream. @magiconair are you interested in such feature in fabio or I'm doing it wrong?