Cloud-based Application Design for Availability and Reliability

According to Amazon’s guide to Cloud Best Practices (2017), “If you design for failure, nothing will fail.”. The recommendation given is to “Be a pessimist when designing architectures in the cloud; assume things will fail. In other words, always design, implement and deploy for automated recovery from failure.”

Jinesh Varia, Lead Technology Evangelist at Amazon AWS, took it further by specifying a total of 12 design patterns (best practices) that all businesses should consider when designing highly available and reliable cloud applications (Figure 1).

Figure 1 – Building Powerful Web Applications in the AWS Cloud (Varia, 2011).

Cloud-based Application Availability/Reliability Patterns

For this post, I have selected three of the above design patterns (Figure 1) that in my opinion are possibly the best techniques for solving the availability and reliability problems of cloud-based applications. Namely the following:

• Leverage Multiple Availability Zones

• Use Caching

• Implement Elasticity

I also explore Amazon AWS services and their product offering related to these design patterns.

 

 

Leverage Multiple Availability Zones

Even though it is rare, the virtual machine can fail and sometimes also entire geographical areas can experience accessibility issues (e.g. local power failures). That said, if the application is hosted on a virtual server sitting in a single location, it can easily be affected by a failure, making application unavailable to its end users.

Amazon Elastic Compute Cloud (EC2) offers cloud-computing in various worldwide regions and availability zones. According to Amazon, “Each region is a separate geographic area and each region has multiple, isolated locations known as Availability Zones.” (Amazon Availability Zones, 2017).

When building a web based application, one of the best practices is to create infrastructure architecture that leverages virtual machine that are hosted in geographically dispersed areas. Essentially, the main goal is to have computing instances in multiple locations and in such way to minimize the risk of downtime. Because even if all VMs in one region or availability zone stop responding, a business can design the application to forward the traffic to VMs in a different Availability Zone, which will carry the requests as if nothing happened. In a way, this is very similar to a load balancing, but on a global/regional scale. In fact, two of the most common AWS architecture patterns are using Load Balancer or Elastic Load Balancer in front of the web applications installed in different availability zones, as illustrated in Figure 2.

Figure 2 – Overcoming Outages in AWS: High Availability Architectures In the AWS Cloud (Ganesan, 2012).

 

 

Use Caching

In cloud computing caching is essentially related to usage of high-speed storage layer that can store a smaller subset of the information related to the cloud-based application. What it means is, that when a request is made to the application, it can serve the data in a much faster fashion from usually the nearest region, without the need for serving the data from a primary storage site.

According to AWS Caching (2017), “A cache’s primary purpose is to increase data retrieval performance by reducing the need to access the underlying slower storage layer. Caching allows you to reuse previously retrieved or computed data efficiently.”

A good example of a cloud service is an Amazon ElastiCache, which is deployed into a web application in the form of a web service that can dramatically improve the overall performance of the cloud-based web applications. It is because it permits application to retrieve data from fast data stores located in memory, instead of slow databases located on disk.

Another service offered by Amazon in this space is a global Content Delivery Network (CDN), called Amazon CloudFront.

Figure 3 illustrates how both Amazon services ElastiCache and CloudFront can be used to design a serverless architecture on AWS.

Image result for cloudfront elasticache architecture

Figure 3 – Serverless Architecture with AWS (GitHub,.2017).

 

 

 

Implement Elasticity

One of the worst architecture patterns when designing a cloud-based web application is to build it on top of non-resizable computing resources because it is hard to scale such an application in during usage spikes.

Amazon offers their Elastic Compute Cloud which allows businesses to build their web application on top of easily resizable cloud based compute capacity, which makes it much easier to create scalable cloud based apps. Amazon offers EC2 services to their users through UI front end that allows customers to configure their computing capacities with minimal friction. However, the true power of the AWS elasticity comes from the usage of EC2 web service API, which allows to architect the application in such way, that the “application can automatically scale itself up and down depending on its needs” (Elastic Compute Cloud, 2017). Figure 3 shows AWS elastic scaling during low/high demand.

Image result for ec2 elasticity

Figure 4 – (Elastic Compute Cloud, 2017)

 

 

 

 

References

Varia J. (2011). Building Powerful Web Applications in the AWS Cloud. [online] Available at: https://softwarestrategiesblog.com/2011/03/10/building-powerful-web-applications-in-the-aws-cloud/ [Accessed 16 Jul. 2017].

AWS Cloud Best Practices (2017). [online] Available at: https://media.amazonwebservices.com/AWS_Cloud_Best_Practices.pdf [Accessed 16 Jul. 2017].

Colangelo, A., Qin, M., Sabo, I., Team, C., Hawkins, A., Casalboni, A., Alapati, S., Badola, V., Casalboni, A., Sheehy, M., Casalboni, A., Casalboni, A., Clinton, D., Colangelo, A., Bellasio, S., Carlstroem, P., Sheehy, M., Casalboni, A., Cecaro, F. and Colangelo, A. (2014). AWS Regions and Availability Zones: the simplest explanation. [online] Cloud Academy Blog. Available at: https://cloudacademy.com/blog/aws-regions-and-availability-zones-the-simplest-explanation-you-will-ever-find-around/ [Accessed 16 Jul. 2017].

Amazon Availability Zones (2017). Regions and Availability Zones – Amazon Elastic Compute Cloud. [online] Available at: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html [Accessed 16 Jul. 2017].

Ganesan, H. (2012). Overcoming Outages in AWS : High Availability Architectures. [online] Harish11g.blogspot.ca. Available at: http://harish11g.blogspot.ca/2012/06/aws-high-availability-outage.html [Accessed 16 Jul. 2017].

AWS Caching (2017). Caching – Amazon Web Services (AWS). [online] Available at: https://aws.amazon.com/caching/ [Accessed 16 Jul. 2017].

GitHub. (2017). jonascheng/serverless-architecture-with-aws. [online] Available at: https://github.com/jonascheng/serverless-architecture-with-aws [Accessed 16 Jul. 2017].

Elastic Compute Cloud (2017). Elastic Compute Cloud (EC2) – Cloud Server & Hosting – AWS. [online] Available at: https://aws.amazon.com/ec2/ [Accessed 16 Jul. 2017].

Comments

comments