How to Pause Load Balancer from temporarily routing any traffic?

Hi Community!

Our company is trying to set up an Ansible Playbook to automate the failover process to Disaster Recovery Site. We are opting for a Warm Standby, as per Disaster Recovery (DR) Architecture on AWS, Part III: Pilot Light and Warm Standby | AWS Architecture Blog

I am aware that Cloudflare Load Balancer will failover automatically based on health check.

But in our case, we have concerns that this happens too fast. We are trying to achieve:

  • Load Balancer is routing traffic to Primary Site only.
  • Primary Site is Down
  • Stop Load Balancer to both Primary and Secondary Sites (temporarily)
  • Verify Database has no more incoming traffic (To prevent failover while data is still being written)
  • Start and complete database failover
  • Rename Load Balancer to Secondary Site

To the end user, they should see the site is inaccesible for a few minutes, but this is expected.

How can we achieve this load balancer configuration with Cloudflare?