How to deal with a failover group

Migrating your stacks is easy with Cloud 66

Having a failover group can help you prevent unwanted downtime should your primary stack become unresponsive, for anything from hardware to networking issues. Follow this guide to setup your failover stack, and how to use it if necessary.

This is a complex procedure, and we recommend that you test it in a staging environment to reduce any potential downtime.

Setup the failover group

As with any migration, you will need to deal with moving your code, data and traffic.

1. Code

Clone your existing stack to a different cloud vendor or data center, and set it into maintenance mode to prevent it from serving content. We highly recommend that you build a stack with similar server specifications to your main stack to avoid issues during a switch.

2. Data

Enable database replication between your stacks - this will setup a master/slave architecture between your stacks, whereby the slave is an exact replica of the master at all times.

3. Traffic

Use Failover Groups to make it easy for you to switch between stacks. By pointing your domain at the Failover address, you will be able to switch your traffic between stacks at the click of a button.

How to use the failover stack

If and when your main stack fails, you will need to switch to the failover stack.

  1. Set your main stack into maintenance mode, to prevent new data being written to it.
  2. Turn off the database replication.
  3. Make your database slave a master - this will allow data to be written to the database.
  4. Turn off maintenance mode on your failover stack.
  5. Use your Failover group menu to switch your traffic to the failover stack. The TTL on the Failover address is 5 minutes, so you should see your users on the new stack momentarily.

 

You must be logged in to comment on this article