Reader small image

You're reading from  AWS Certified Solutions Architect ??? Associate Guide

Product typeBook
Published inOct 2018
PublisherPackt
ISBN-139781789130669
Edition1st Edition
Tools
Right arrow
Authors (2):
Gabriel Ramirez
Gabriel Ramirez
author image
Gabriel Ramirez

Gabriel Ramirez is a passionate technologist with a broad experience in the Software Industry, he currently works as an Authorized Trainer for Amazon Web Services and Google Cloud. He is holder of 9/9 AWS Certifications and does community work by organizing the AWS User Groups in Mexico.
Read more about Gabriel Ramirez

Stuart Scott
Stuart Scott
author image
Stuart Scott

Stuart Scott is the AWS content lead at Cloud Academy where he has created over 40 courses reaching tens of thousands of students. His content focuses heavily on cloud security and compliance, specifically on how to implement and configure AWS services to protect, monitor and secure customer data in an AWS environment. He has written numerous cloud security blogs Cloud Academy and other AWS advanced technology partners. He has taken part in a series of cloud security webinars to share his knowledge and experience within the industry to help those looking to implement a secure and trusted environment. In January 2016 Stuart was awarded 'Expert of the Year' from Experts Exchange for his knowledge share within cloud services to the community.
Read more about Stuart Scott

View More author details
Right arrow

Matching Supply and Demand

Reliability is the characteristic of a system to acquire compute resources when patterns in traffic change and the ability to acquire resources dynamically to match the demand. Services like Auto Scaling and Elastic Load Balancing are designed to provide such capabilities to compensate capacity as needed and scaling into lower costs.

Every company and application is different so proactive and reactive mechanisms that can adapt to organic traffic must be used or even schedule anticipated increases on demand.

The following topics will be covered in this chapter:

  • Elastic Load Balancing and types
  • ELB attributes
  • AWS Auto Scaling

Technical requirements

There are no technical requirements for this chapter.

Elastic Load Balancing

Elastic Load Balancing provides applications with a reverse proxy service that hides and encapsulates direct access to EC2 instances. Load balancers are a great way to decouple applications by introducing indirection levels with managed services that provide capabilities like multi-AZ request distribution, security, and SSL offloading from EC2 fleets.

The Elastic Load Balancer is a fully managed service designed to scale horizontally with high availability. Applications can rely on load balancers to receive proxied traffic through TCP, HTTP/HTTPS, and SSL protocols.

Working with the service consists of provisioning an ELB, configuring its attributes, and registering targets. The ELB performs frequent health checks to validate the availability of the targets to handle traffic. When instances pass HTTP health checks successfully the ELB performs a weighted...

ELB attributes

We will go through the ELB attributes in the following sections.

Stateless versus stateful

Robust scalable and fault-tolerant architectures are designed using stateless servers: servers which do not handle any user state like shopping carts, state between pages and authentication tokens. Services like DynamoDB and ElastiCache are great options to offload temporary session data to an external service, so when applications fail they do it gracefully.

Stateful applications, on the other hand, do manage conversational state with the end user and are not fault tolerant, for these legacy applications you can enable sticky sessions which are a good way to provide session affinity with the persistent server; once this...

AWS Auto Scaling

Create an EC2 instance, this instance will be used as a baseline to create a web server AMI, you can use the default VPC to make this process straightforward:

  1. Navigate to EC2 and create an instance choosing the Amazon Linux 2 AMI, you can name it Web Server Base; make sure to create an SSH key and open SSH traffic via the port 22 to be able to log into the server when it becomes available. Copy the public IP as you will need it in the next steps.
  1. Using the public IP, ssh into the server. If you have questions about the process, check the first chapter or read the instructions for Connecting to Your Linux Instance Using SSH using the following link: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
  2. Now execute the following commands in order to install the Apache web server and download the sample code for our demo web app:
sudo...

Summary

In this chapter, you have implemented a full end to end solution that provides resiliency and scalability to the web server tier using AMIs Auto Scaling groups and Elastic Load Balancing by provisioning and configuring an application load balancer.

We discussed different types of load balancers available and the benefits and tradeoffs of each one. A mention of some of the most relevant and day to day use attributes available like cross-zone load balancing and connection draining.

With Auto Scaling we created a logical grouping of instances that is designed to provide a minimum capacity at all times and tested by the injection of failure to observe how the system performs auto-healing.

Further reading

lock icon
The rest of the chapter is locked
You have been reading a chapter from
AWS Certified Solutions Architect ??? Associate Guide
Published in: Oct 2018Publisher: PacktISBN-13: 9781789130669
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Gabriel Ramirez

Gabriel Ramirez is a passionate technologist with a broad experience in the Software Industry, he currently works as an Authorized Trainer for Amazon Web Services and Google Cloud. He is holder of 9/9 AWS Certifications and does community work by organizing the AWS User Groups in Mexico.
Read more about Gabriel Ramirez

author image
Stuart Scott

Stuart Scott is the AWS content lead at Cloud Academy where he has created over 40 courses reaching tens of thousands of students. His content focuses heavily on cloud security and compliance, specifically on how to implement and configure AWS services to protect, monitor and secure customer data in an AWS environment. He has written numerous cloud security blogs Cloud Academy and other AWS advanced technology partners. He has taken part in a series of cloud security webinars to share his knowledge and experience within the industry to help those looking to implement a secure and trusted environment. In January 2016 Stuart was awarded 'Expert of the Year' from Experts Exchange for his knowledge share within cloud services to the community.
Read more about Stuart Scott