PRIYANKA VERGADIA: Welcome to "Get
Cooking in Cloud," where we share the best recipes
to apply in your Cloud kitchen.
I'm Priyanka, and in today's episode,
we'll share the recipe to plan for data recovery
when production environment is on Google Cloud.
[MUSIC PLAYING]
In the last episode, we learned about Main Street Style
that deployed their production environment on premises,
and set up a data recovery and backup on Google Cloud.
We also learned that there are two scenarios involved when
we talk about data recovery.
It's the data backups and the database backups.
Today we will talk about main event planning, who currently
runs the infrastructure on Google Cloud,
so the disaster recovery environment also
runs on Google Cloud.
First let's talk about that data backup and recovery.
They have a tiered storage pattern
on Google Cloud with Persistent Disk attached to Compute
Engine, and they migrate data to a low-cost tier
like nearline or coldline storage,
since the requirement to access the backup data
is very less likely.
Now, let's talk about the database backups and recovery.
They have one self-managed MySQL database deployed
on Compute Engine, and they use Cloud BigTable and BigQuery,
which are managed databases.
Managed databases are designed for scale.
BigTable provides regional replication,
which provides higher availability
than a single cluster, additional read throughputs,
and a higher durability and resilience
in case of zonal failures.
They use BigQuery to archive data,
which is a great cost-effective storage for long-term,
since the storage price drops to 50%
if the data does not change for 90 days.
Best part about using BigQuery is
that it's replicated by default. But remember, that does not
save you from data corruption-- say, by erroneous updates.
For more on dealing with data corruption,
or if you're using any other managed Google Cloud databases
like Cloud Spanner, Cloud Composer, or Datastore,
there's a link in the description just for you.
Now, let's talk about that one self-managed MySQL database
that Main Event Planning has deployed on Compute Engine.
Here's how this works.
Create a VPC network, and create custom image
that's configured with the application service.
As a part of the image, make sure the persistent disk is
attached for the data being processed,
create a snapshot from the attached persistent disk,
and configure a startup script to create a persistent disk
from the latest snapshot, and mount the disk.
Then create an instance template from the previously created
image.
Using this instance template, configure
a regional managed instance group with a target size of 1.
Make sure the health checks are configured
at the managed instance groups.
Configure internal load balancing
using the regional managed instance group as well.
Then configure a scheduled task to create regular snapshots
of the persistent disk.
Now, what happens in case of a disaster?
Well, Main Event Planning does not
need to initiate any failover steps,
because they occur automatically.
That is the best part of the default HA features
available in Google Cloud.
In the event a replacement database instance is needed,
disk configuration automatically brings up
another database server of the correct version,
attaches a persistent disk that has the latest
backup and transaction log files,
minimizes the need to reconfigure clients that
communicate with the database server,
ensures the same Google Cloud Security controls, the IAM
policies, and the firewall settings
apply to the recovered database server.
To learn more about these components,
check out the previous episode on cold disaster
recovery for applications on Google Cloud.
Well, there you have it.
If you have a production application deployed
in Google Cloud and need to set up data recovery, then
hopefully you've learned some strategies
to apply in your specific scenario.
That's all for today on "Get Cooking in Cloud."
Here's hoping you're whipping up your own DR strategy.
Join us next time, where we will share some more
recipes on Google Cloud.
If you like this video and would like to see more such content,
then hit those Like and Subscribe buttons.