I’m planning to move to cloudflare for the WAF / Forward proxy service.
First thing first, this is my architecture :
- 4 web servers (2 on each DCs)
- 2 databases (MySQL) but this isn’t that much usefull
The 4 web servers will be on and active. I don’t want to loadbalance anything. Just failover in case of network failure or DDoS for example.
I’m looking for a failover mechanism by group. I mean that if one server of the two per DC will fail, Cloudflare will switch to the other DC for the 2 sites (I think I have read that in the documentation, it’s solved by pools, right ?) but due to internal complexity I don’t want the site first site to become active again in case of “back to normal” situation.
Is this feasible?
Also, could you tell me if there is any way to execute a command or a script when the failover is done ? I’m looking for a way to make my server conscious that he’s now the “active” server.
I know that the request is a bit tricky and even odd, but anyway, thanks in advance for your help !