Hot Disaster Recovery for Applications on Google Cloud
Get Cooking in Cloud
“Get Cooking in Cloud” is a blog and video series to help enterprises and developers build business solutions on Google Cloud. In this second miniseries I am covering Disaster Recovery on Google Cloud. Disasters can be pretty hard to deal with when you have an online presence. In the these articles, we will elaborate on how to deal with disasters like earthquakes, power outages, floods, fires etc.
Here is the plan for the series.
- Disaster Recovery Overview
- Cold Disaster recovery on Google Cloud for on-premise applications
- Warm Disaster recovery on Google Cloud for on-premise applications
- Hot Disaster recovery on Google Cloud for on-premise applications
- Cold Disaster recovery for applications in Google Cloud
- Warm Disaster recovery for applications in Google Cloud
- Hot Disaster recovery for applications in Google Cloud (This article)
- Disaster recovery on Google Cloud for Data: Part 1
- Disaster recovery on Google Cloud for Data: Part 2
In this article, you will learn to set up a Hot DR pattern for the applications that are deployed on Google Cloud. So, read on!
What you’ll learn
- Hot DR pattern for Google Cloud applications, with an example
- Steps to be taken before a disaster hits
- Steps to be taken during a disaster
- Steps to be taken after a disaster
- Basic concepts and constructs of Google Cloud so you can recognize the names of the products.
- Read the overview article for DR related definitions.
Check out the video
Let’s learn Hot DR pattern with an example
We met Mane-Street-Art in the previous article but now they’ve become really popular and acquired a huge and global customer base which requires them to be online all the time without fail. So we will help them set up a Hot DR pattern with next-to-no downtime.
Mane-street-art has a unique advantage, since they are deploying their production application on Google cloud they can take full advantage of the built-in High Availability (HA) features.
Note: If you are unfamiliar with the terms used here (RTO, RPO, DR Patterns) checkout the previous blog to get an overview.
In any DR pattern you need to understand what steps need to be taken before, during and after a disaster.
Hot DR Pattern — How does it work?
Steps to be taken before disaster hits
- They would have to Create a VPC network
- Create a custom image that’s configured with the application service.
- Use that image to create an instance template.
- Using this instance template, configure a regional managed instance group. This is to ensure resilience, if the whole zone was to go down, the instances will still be available in other region to keep the application running.
- Make sure the HTTP and instance health checks are configured at the managed instance groups to verify that the services and instances are properly running within a group. This ensures that if a service on an instance fails, the group automatically re-creates that instance.
- Configure load balancing using the managed instance group that spans across three zones.
- Create CloudSQL in one zone as a master and enable a replica in another zone. Doing this means that in case the master becomes unavailable replica can be promoted to become the master.
- Finally, configure the Cloud DNS to point at the primary application.
Steps to be taken when disaster hits
When a disaster hits, all Mane-street-art has to do, is to watch the system heal itself.
Steps to be taken after the disaster has passed
Since we built a self healing system with High Availability built in, there is not much to do during and after the disaster. The instances come and go as needed in different zones during the disaster.
If you are deploying an application on Google Cloud and have to meet those really low RTO and RPO values, like Mane-Street-Art, then use some of the built-in Google Cloud HA features. Stay tuned for upcoming articles, where you will learn to set up more DR for Data.
- Follow this blog series on Google Cloud Platform Medium.
- Reference the DR solutions.
- Follow Get Cooking in Cloud video series and subscribe to Google cloud platform YouTube channel
- Want more stories? Check my Medium, follow me on twitter.
- Enjoy the ride with us through this miniseries and learn more about more such Google Cloud solutions :)