Lab Details
This lab will show you how to create two Amazon EC2 instances. Both servers will have Apache web server installed. Both servers will contain HTML pages that are publicly accessible. Next, you'll create an Application Load Balancingr that distributes traffic between 2 Amazon EC2 instances. You can also add path-based routing to the ELB.
This lab will be practiced using AWS ELB and Amazon EC2.
Duration: 90 minutes
AWS Region: US East, N. Virginia us-east-1
Introduction
What is Path-Based Routing?
The Application Load Balancingr has unique features that are superior to Classic ELB, including Path-based Routing.
ALB forwards incoming requests to different destinations depending on the path you specify in the uri.
Make listeners that forward requests to the target groups using the URL.
What is Elastic Load Balance?
ELB is an application that distributes traffic to the server and scales resources accordingly.
ELB allows you to adjust your capacity according to the incoming traffic and application.
ELB can be activated in a single availability zone, or across multiple availability areas to ensure consistent application performance.
ELB features include:
Detection and treatment of unhealthy EC2 cases
Only spread EC2 instances through healthy channels.
SSL Certificate Management Centralized
Optional public key authentication
Both IPv4 as well as IPv6 support.
ELB receives traffic from clients and routes it to its registered targets.
ELB will stop routing traffic to an instance or target that is unhealthy and restart it only after the instance becomes healthy.
ELB monitors the health and traffic routing to the healthy targets.
ELBs can be configured to accept traffic by specifying one of several listeners. Listeners are processes that check for connections requests.
Listeners are configured using a protocol number and port number that goes from the client to ELB and vice versa, i.e. from target to ELB.
ELB supports three types of load balancers
Application Load Balancing
Network load balancers
Load balancers from the past
Every load balancer is different.
You register targets in target group and route traffic to them for Application and Network Load Balancingrs
You register instances for Classic Load Balancers with the load balancer.
AWS recommends that users use Application Load Balancingr to use multiple availability zones. This is because, if one zone fails, the load balancer can route traffic to the next one.
You can choose to have your load balancer either internet-facing or internal.
An internet-facing loadbalancer's nodes have Public IP addresses. The DNS name can be publicly resolved to the public IP addresses.
Internet-facing load balancers are able to route clients' requests over the Internet, as per the above.
An internal load balancer's nodes have Private IP addresses. The DNS name can be publicly resolvable to their Private IP addresses.
Because of the above, internal load balers can only route requests from clients who have access to the VPC to the load balancer.
Both internal load balancers and internet-facing load balancers route requests using Private IP addresses to their targets.
To receive requests from internal load balancers or those that are accessible via the internet, your targets don't need public IP addresses.
What is Amazon EC2 exactly?
AWS refers to it as Elastic Compute cloud.
You can rent a virtual environment to create your own environment, and it's free.
These virtual machines are known as Instances by Amazon.
You can use pre-configured templates to launch instances. These templates are known as images. These images are available from Amazon in the form AMIs (Amazon Machine Images).
This allows you to create custom applications and services.
It is simple to scale infrastructure, i.e. up or down depending on your demand.
AWS offers multiple configurations of storage, CPU, memory, and other options. You can choose the flavor that is best for you.
There is no limit to storage. The type of instance you are working with will determine the storage that you choose.
Instance Store Volumes are temporary storage volumes. This data is deleted when the instance ends.
There are persistent storage volumes available. They are known as EBS volumes (Elastic Block Store).
These instances can be placed in multiple locations, which are called Regions and Availability Zones.
Your Instances can be distributed across multiple AZs, i.e. within one Region. If an instance fails, AWS will automatically remap the address to another AAZ.
It is possible to migrate instances from one AZ to another.
You can assign your own metadata to each resource, such as tags, in order to manage instances, images and other EC2 resources.
A tag is a label you give to an AWS resource. It can contain a key or an optional value. Both of these are set by you.
AWS accounts come with default resources limits that are per-Region.
AWS is required to inform you if the limit is increased.
Key pairs are used to work with created instances.