What is/are your DR plan?

Can you guys share yours? also where should i start? like reading resources.

initially i thought theres no need to have a DR but then came to my mind that i can deploy a standby on another region and just clone the servers

our aws are mostly rds mysql, elasticache and ec2

A lot of DR planning will depend on your specific RTO and RPO that you need to support. We have pretty aggressive DR plans (RTO less than 12 hours, RPO less than one hour), so we need to ensure we’re replicating in real time to a second region, at least from a database perspective.

I can’t give specifics of our plan/documentation, but some food for thought on how we do things - our overall infrastructure is based on autoscaling groups, Postgres databases, memcached, redis and some other EC2 instances that are statically built.

For starters, we have everything deployed via Terraform, so if we need to build to a second region, it’s easily by changing a handful of variables and deploying to another AWS region. This includes VPCs, ASGs, and everything else that needs to be built.

For ASGs/EC2 instances, we use a combination of backups and IaC for recovery. ASGs, we do monthly maintenance on our AMIs to perform security updates or any other configuration changes. When we build that AMI, we build it both in the production region, as well as the DR region. That ensures we can always run from the secondary region without any dependency on the first region. We use packer for this today to build the AMIs in multiple regions.

For static EC2 instances that aren’t part of ASGs, we use N2WS CPM to perform backups/snapshots of those instances daily, and also use the cross-account/cross-region DR functionality to ensure those snapshots are being backed up across accounts/regions, again, to remove the reliance on the production account/region.

For database, we currently run Postgres on EC2, but the same concept could apply for RDS. We run our primary instance in our production region with a few read replicas. We also have a secondary instance in another region with asynchronous replication in place to ensure the database is kept in sync, close to real time.

The other components (redis, memached, etc.) are built via Terraform and are just re-populated when started up. Nothing needs to be persisted in those specific layers for our specific use cases.

We failover manually for all situations - nothing automated at this stage. In the event of a region failure, we’ll spin up our terraform stack to define all the resources, deploy application code use Code Pipeline/Code Deploy, and then cutover DNS records to point to the new stack in the secondary region.

Step 1. Post resume to all job boards
Step 2. Begin DR procedures

In seriousness, it depends if you consider DR multi region or just single region but multi az. Multi region is much more involved and difficult. And really it depends on your app. If you’re configuring multi region because “we need coverage for when us-east-1 goes down” then I think it’s not the best use of your time. As at that point likely half the Internet is offline. And if your plan is to have cloud formation/terraform ready to go in that scenario then you’ll be fighting for capacity with all the other companies trying to do the same.

All this to say is unless you require multi region DR for a compliance issue I’d spend my time architecting for multi AZ

As Jamsan said, DR strategy is not a one-size-fits-all approach, it’s a lambda based on your company’s needs.

Audit also has much to do with your strategy. Your company might have one opinion of how much it wants to spend on securing your data, but if you’re in a regulated industry, the audit companies have another… and it’s generally a higher dollar amount.

RPO and RTO are the two major metrics you need to consider.

RPO = How far back can we restore from?

If you are running a blog that’s not updated frequently, or the data your customers upload generally isn’t that important ( ie. you host an app that stores images of people’s faces with dog noses overlayed), your RPO can be pretty lenient. 24 hours is fine.

But if you’re running an online store or processing transactions where money changes hands, you need real-time, transactional RPO. That generally means you need an ACID compliant, multi-node data store to house your transactional data, with real-time offsite log shipping. It’s not okay under any circumstance to say “I don’t have a log of that occurring” when payment info is of concern. That’ll fail your next PCI audit.

The next factor is RTO – or, how long can the company be down?

This is typically governed by contractual obligations with customers, as well as the burn rate of the business while down. I worked for a processing company where we had 3000+ staff in the system at any given point. If the system went down, the effective cost to the company is all of those people’s salary, plus all the infrastructure cost, plus all the potential customers that chose another provider… It was something like $1 million dollars per hour.

So with that cost factor, we ran active:active data centers. If one went down, all services were already running on the other side.

Active:Active is the most expensive way to do DR. The next best way is Active:Passive, where you have snapshots of all your servers ready to be spun up if the primary fails, but it takes 5-15 minutes for everything to be ready.

The least effective DR strategy is… manually. Anything requiring human intervention means RTO is out the window. Restoring from backups is a bad way to go, but it is the cheapest ( storing backups on S3 is cheaper than maintaining active EBS snapshots )

Active:Active is the most expensive way to do DR. The next best way is Active:Passive

You missed Warm Standby and Pilot Light

those are forms of active:passive aren’t they?

If they were they wouldn’t be called differently. These are rather shades of Active:Active, but still not quite.