Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Learning the Hard Lessons of Public Cloud: Designing for AWS Outages

DZone's Guide to

Learning the Hard Lessons of Public Cloud: Designing for AWS Outages

Did your site, app, or service go down during the AWS S3 outage, too? Fun times. Learn how to prepare for those outages so you're not at your public cloud's mercy.

· Cloud Zone
Free Resource

Deploy and scale data-rich applications in minutes and with ease. Mesosphere DC/OS includes everything you need to elastically run containerized apps and data services in production.

So, your site is down because AWS S3 went away. Too soon? It’s never too soon to talk about why the responsibility for designing resilient infrastructure belongs in your camp. It’s like when Smokey the Bear used to say that “only you can prevent forest fires”. The difference is that it’s Jeff Bezos saying it this time.

This time we have a special treat for you as we have some real insight into what design for cloud resiliency really means thanks to a chat that I had yesterday. Let’s see why this conversation was important and then get right to it!

Cloud Goes Down, so Design for It

There is no special text in the terms and conditions. These are hard facts. AWS designs its infrastructure to be as resilient as possible but clearly tells you that you should design with the intention of surviving partial service outages. It isn’t that AWS plans on being down a lot, but they have been hit by specific DDoS attacks, and also have had to reboot EC2 hosts in order to patch for security vulnerabilities.

At the time I’m writing this, AWS S3 is fighting its way back to life in the US-east-1 Region. This means that there are multiple Availability Zones which are in the throes of recovery, and that potentially hundreds of thousands of websites, and applications are experiencing issues retrieving objects from the widely used object storage platform.

If this all looks familiar, it is because I’ve shared this before on this blog.

So, how do we do this better? Let’s ask someone who does design and see how the developers think about things. With that, I wanted to share a great discussion that I had with Steve Haines.

A Brief Chat on Understanding the Developer’s Reaction to the AWS Outage

ERIC: What does it mean to think about designing across regions inside the public cloud?

STEVE: Designing an application to run across multiple AWS regions is not a trivial task. Sure you can deploy your stateless services or microservices to multiple regions and then configure Route53 (Amazon’s DNS Service) to point to Elastic Load Balancers (ELBs) in each region, but that still does not completely solve the problem.

First, we have to consider the cost of redundancy. How many regions and how many availability zones (AZ) in each region do we want to deploy to? From historical outages, you’re probably safe with two regions, but you do not want to keep a full copy of your application deployed in another region just for disaster recovery: you want to use it and distribute workloads across those regions!

For some use cases this will be easy, but for others, you will need to design your application so that it is close to the resources it needs to access. If you design your application with failure in mind and to run in multiple regions then you can manage the cost because both regions will be running your workloads.

ERIC: That seems to be a bit of the cost of doing business for design and resiliency, but what is the impact below the presentation layers? It feels like that is the sort of “low hanging fruit” as we know it, but there is much more to the application architecture than that, right?

STEVE: Exactly! That leads to the next challenge: resources, such as databases and files. AWS gives you multi-AZ database replication for “free” for databases running behind RDS (and I say for free because you still have to pay for the storage, IOPS, etc, but they provide the replication mechanism), but the story changes when you try to replicate across regions. For example, Oracle provides a product called GoldenGate for performing cross-region replication, which is a great tool, but can significantly impact your IT budget.

Alternatively, you can consider one of Amazon’s native offerings, Aurora, which supports cross-region replication out-of-the-box, but that needs to be a design decision you make when you’re building or refactoring your application. And, if you store files in S3, be sure that you enable cross-region replication, it will cost you more, but it will ensure that files stored in one region will be available in the event of a regional outage.

ERIC: Sounds like we have already got some challenges in front of us with just porting our designs to cloud platforms, but when you’re already leaning into the cloud as a first-class destination for your apps we have to already think about big outages. We do disaster recovery testing on-premises because that’s something we can control. How do we do that type of testing out in the public cloud?

STEVE: That’s a great question. Remember that designing an application to run in a cross-region capacity is one thing, but having the confidence that it will work when you lose a region is another beast altogether! This is where I’ll defer to Netflix’s practice of designing for failure and regularly testing failure scenarios. They have a “Simian Army” that simulates various failure scenarios in production and ensures that everything continues to work. One of the members of the Simian Army is the Chaos Gorilla that regularly kills a region and ensure that Netflix continues to function, which is one of the reasons they were able to sustain the previous full region outage. If you’re serious about running across regions then you need to regularly validate that it works!

But maybe we should think bigger than cross-region – what if we could design across clouds for the ultimate protection?

ERIC: Thanks for the great information, Steve. I know that it’s excellent food for thought for all of us in the IT industry. I’m sure that there are a lot of people having this discussion today after the recent outage.

Discover new technologies simplifying running containers and data services in production with this free eBook by O'Reilly. Courtesy of Mesosphere.

Topics:
public cloud ,cloud ,aws s3 ,outages

Published at DZone with permission of Eric Wright, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}