Designing Highly Available, Cost Efficient Cloud Solutions
Developing Cloud Solutions
An introduction to the AWS components that help us develop highly available, cost-efficient solutions.
- Understand the core AWS services, uses, and basic architecture best practices
- Identify and recognize cloud architecture considerations, such as fundamental components and effective designs
Elasticity and Scalability
Regions and AZ's
Amazon Elastic Load Balancer
Amazon Simple Queue Service
Amazon Elastic IP Addresses
Amazon Auto Scaling
Identify the appropriate techniques to code a cloud solution
Recognize and implement secure procedures for optimum cloud deployment and maintenance
Using Amazon SQS
Using Amazon SNS
Using Amazon SWF
Using Cross Origin Resources (CORS)
If you have thoughts or suggestions for this course, please contact Cloud Academy at firstname.lastname@example.org.
Hi, in this lecture we'll talk about a decoupled application. I began talking about it in the SQS lecture, now it's time to go deeper. But for that, we'll first need to define some concepts.
When we talk about a decoupled application, we must avoid single point of failures. This means that our application should be able to fail, and yet be available for at least some basic services. Deciding which those are is a unique decision for each application that you deploy. Another thing that you should take care of is to write and design an application capable of growing and shrinking according to your needs. You can achieve both of these objectives by dividing your application into small pieces that can be easily replaced or improved as you need. These pieces, or blocks, should be optimized to do a single job with perfection. Last but not least, after following all those objectives, it would be pretty easy to achieve high availability for your application. In fact, you'll probably have nothing more to do.
So let's actually see some action. A common task is managing web sessions when working with the elastic load balancer.
You should avoid the use of sticky sessions or application managed cookies in order to let the ELB work properly, and evenly divide incoming traffic between your EC2 application instances. However, you do need to manage these sessions so that they need to be available in a common place. The solution for that could be to store sessions in a DynamoDB table, with the right amount of provision throughput set, or to use a dedicated service like Elasticache to do the job.
Since we didn't cover Elasticache in any of our previous lectures, I'll quickly introduce it to you now. Elasticache is a dedicated service that makes it easy to deploy, operate, and scale in-memory cache. It has support for two open source solutions: Memcached and Redis.
Elasticache is self-managed so it automatically detects and replaces failed nodes that are basically EC2 instances that can't be managed directly. This service is mostly used for cache database responses or web sessions, but there are really all kinds of possible applications.
Now that we have all we need, on to the design. In this example, we're receiving all traffic coming from the internet by way of Route 53, which sends it to an elastic node balancer that in turn sends requests evenly to the underlying EC2 instances.
Notice that the sessions are managed outside of the instances themselves. I previously mentioned both solution to emphasize that both would work fine, so imagine that our application is running web instances based on a WordPress installation that works with a mySQL database on our DS. Our blog articles started to receive many requests, and we decided to sell some as premium articles.
So we created a system that delivers the purchase request through an SQS queue, and we set up some working instances to process them. Notice that they are in an auto-scaling group which can grow and shrink the instances as we need. We can even have zero instances running when there are no requests in the SQS queue. We could achieve that by enabling a CloudWatch alarm for the SQS queue. After processing the requests, our worker instances publish a message on an SNS topic that can be configured to send a message to our sales team as well as another SQS queue that another set of worker instances are polling to finalize the process and write the changes in our RDS database.
Wow, too much? I really hope that you could follow me through all this, and if you could, then you'll have almost everything you'll need for the certification exam. AWS does not really expect that we know a programming language or an AWS SDK, just how to deploy applications using AWS services.
Andrew is fanatical about helping business teams gain the maximum ROI possible from adopting, using, and optimizing Public Cloud Services. Having built 70+ Cloud Academy courses, Andrew has helped over 50,000 students master cloud computing by sharing the skills and experiences he gained during 20+ years leading digital teams in code and consulting. Before joining Cloud Academy, Andrew worked for AWS and for AWS technology partners Ooyala and Adobe.