Definition
- Elastic Load balancers are virtual appliances that spread the load of your traffic across your different Web servers.
Lab
- Create VMs
- Hello1
-
18.221.76.212
- 172-31-30-194
- index.html = ‘Hello1’
- healthcheck.html = ‘healthy’
- Tags: Group=Hello
-
- Hello2
-
18.220.213.83
- 172-31-6-106
- index.html = ‘Hello2’
- healthcheck.html = ‘healthy’
- Tags: Group=Hello
-
- Hello1
- Create your ELB (Classic)
- [Create Load Balancer]
- Classic -> [Create]
- 1. Define LB
- Name=HelloELB
- HTTP
HTTPS > HTTP
- 2. Security Groups
- 3. Configure security settings
- You’ll need to do this if you selected https in Step 1. Skipping for now
- 4. Configure Health Check
- Response Timeout: How long to wait for a reply [2]
- Interval: How long to wait between checks [5]
- Unhealthy Threshold: How many checks before labeling ‘unhealthy’ [2]
- Healthy Threshold: How many checks before labeling ‘healthy’ [3]
- [Next]
- 5. Add EC2 Instances
- 6. Add Tags
- Group = Hello
- 7. Review
- [Create]
- Get DNS
- HelloELB-1120350220.us-east-2.elb.amazonaws.com
Classic Notes:
- No ‘sticky’ or ‘persistent’ sessions. Seems to toggle between the 2 instances.
- Classic ELBs support both IPv4 and IPv6 (Adv. quiz question)
Adding Instances
To add a new instance to a Load Balancer, you must ‘register’ it with the Load Balancer’s ‘Target Group’ Shortly after it is registered, it will start responding to the LB.
Useful Links
These links were sent to me by AWS in an email:
Creating your first Application load balancer:
– Getting Started: http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/load-balancer-getting-started.html
– Migrating your existing load balancer: http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/migrate-to-application-load-balancer.html
A few How-Tos that will help you set up your Application load balancer initially.
– Applying Path-Based Routing: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/tutorial-load-balancer-routing.html
– Using ECS Containers as Targets: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/tutorial-target-ecs-containers.html
– Creating an HTTPS Listener: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html
– Creating a Target Group: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-target-group.html
– Configuring Health Checks: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html
After getting your Application load balancer set up, you can check out these other features.
-Access logs for detailed information for all requests made to your load balancer: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html
– Monitoring your Load Balancer Using CloudWatch Metrics: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-monitoring.html
– Limits: http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html
We hope these resources will answer your questions and help you get started using Application load balancers. If you have additional questions or concerns, please reach out to us on the Amazon EC2 forum: https://forums.aws.amazon.com/forum.jspa?forumID=30