AWS from zero · Part 2: Networking and compute · Lesson 12 of 38 · about 50 minutes

Load balancers and auto scaling

The bakery's shop moves from one server to a group of them in two zones, behind an Application Load Balancer. Requests spread across the servers; a server is killed and replaced without anyone touching it; AWS runs out of servers in one zone and the group quietly uses the other; and a scaling policy sets up its own alarms. Plus what a load balancer costs before anyone visits.

By the end you'll know

  • What a load balancer does, and the three kinds AWS sells
  • What listeners, target groups and health checks are
  • What a launch template and an Auto Scaling group are, and what minimum, maximum and desired mean
  • How a group replaces a failed server, and why a new server isn't ready the moment it's running
  • Why spreading across zones matters, from a real capacity shortage
  • How scaling policies work, and the two meanings of "policy" in AWS

Before you start

  • You need: the juniper-rye profile from Lesson 4, signed in, and Lessons 8 to 10.
  • The script: lb-lab.sh from the practice folder's lesson-12. Everything it creates is named jr-lesson12-*, and its delete step removes it.
  • How the script talks to AWS: only through the AWS CLI. The few lines of Python in it just turn the CLI's JSON into readable tables and never connect to AWS; boto3, AWS's Python library, comes in Lesson 20.
  • To see every call the script makes, put SHOW=1 in front of any step, such as SHOW=1 ./lb-lab.sh build. The lesson's "By hand" section lists them all too.
  • Where you run things: your own machine, labeled (Your machine).
  • Every output below is from a real run on November 10, 2026.

A load balancer bills from the moment it exists

The lab costs about $0.061 an hour: the load balancer, its public addresses and two servers. Half an hour is a few cents from credits. Forgotten, it's $44.60 a month, and the load balancer alone is $16.43 of that before anyone visits. Run delete the same day and check every line shows 0.

The short version

  • A load balancer is one address in front of many servers. It spreads requests across them and stops sending to any that fail their health check.
  • An Auto Scaling group keeps a number of servers running, built from a launch template, and replaces any that fail.
  • Minimum, maximum and desired set how many: the group never goes below the minimum or above the maximum, and aims for desired.
  • Spread across at least two zones, for outages and for capacity: in this run, AWS ran out of t4g.micro servers in one zone.
  • Scaling policies change desired for you, for example to keep average CPU (central processing unit) use near 50%.

What this lesson costs

PartCost
Target group, launch template, Auto Scaling group, scaling policy$0
Application Load Balancer$0.0225 an hour, plus capacity units for traffic
Its public IPv4 addresses, one per zone$0.005 an hour each
Two or three t4g.micro servers, each with a public address and diskAbout $0.014 an hour each
This lessonA few cents, from credits
If it were left running$44.60 a month

From one server to a group

Lesson 10's bakery ran on one server. If it crashed, the shop was down until someone noticed. If the weekend rush doubled the traffic, it slowed to a crawl. And its address changed every time it stopped. Three AWS pieces fix all three:

PartWhat it doesIn the bakery
Load balancerOne address that spreads requests across serversThe shop's front counter, sending each customer to a free till
ListenerWhich port and protocol the load balancer answers on, and where it sends requests"Customers through the main door go to the tills"
Target groupThe servers requests go to, and the health check that decides which are workingThe tills, and someone checking each one is open
Launch templateThe recipe for a new server: image, size, security group, launch scriptThe training manual for a new staff member
Auto Scaling groupKeeps a number of servers running from the template, replacing failed ones and adding or removing as neededThe manager who keeps enough tills staffed

Three kinds of load balancer

KindWorks withChoose it for
Application Load Balancer (ALB)HTTP and HTTPS, and can route by path or host nameWebsites and APIs. This lesson's.
Network Load Balancer (NLB)TCP and UDP, millions of requests a second, a fixed IP address per zoneGames, IoT (Internet of Things) devices, anything not HTTP, or needing a fixed address
Gateway Load BalancerNetwork traffic sent through security appliancesThird-party firewalls and inspection

There was a fourth, the Classic Load Balancer; it's the previous generation, and new setups don't use it.

Is it allowed, and what does it cost?

(Your machine)

BASH
cd ~/Apps/aws-practice/lesson-12
chmod +x lb-lab.sh
./lb-lab.sh fence
OUTPUT
== Is this allowed in us-east-2?
  Elastic Load Balancing             allowed (it has no dry run; this reads instead)
  EC2 Auto Scaling                   allowed (the same)
  launch a t4g.micro server          allowed
== What it costs, in us-east-2 (AWS Price List)
  load balancer:                $0.0225 an hour, $16.43 a month, before traffic
  load balancer capacity units: $0.008 per LCU-hour; a quiet shop uses a fraction of one
  each server, t4g.micro:      $0.0084 an hour
  each public IPv4 address:     $0.005 an hour: one per server, and one per zone for the load balancer
  this lab, 2 servers in 2 zones: about $0.061 an hour, $44.60 a month if forgotten

A load balancer has two charges: $0.0225 an hour just for existing, and LCUs (load balancer capacity units), a measure of traffic, connections and rules, at $0.008 per LCU-hour. A small shop uses a fraction of one LCU, so the hourly charge is most of the bill. It also has a public IPv4 address in each zone, at the usual $0.005 an hour each.

Build it

In the console: EC2 > Load balancers > Create load balancer > Application Load Balancer, with a new target group. Then EC2 > Launch templates > Create launch template, and EC2 > Auto Scaling groups > Create Auto Scaling group, attached to the target group.

(Your machine)

BASH
./lb-lab.sh build

build creates, in order: a VPC with public subnets in us-east-2a and us-east-2b, two security groups, the load balancer, a target group and listener, a launch template and the Auto Scaling group. Then it waits until two servers pass their health checks, about four minutes in all.

The two security groups are Lesson 9 in practice:

Security groupAllows inWhich means
jr-lesson12-alb-sg, on the load balancerPort 80 from your IPOnly you can reach the shop. A real shop would allow 443 from 0.0.0.0/0.
jr-lesson12-web-sg, on the serversPort 80 from jr-lesson12-alb-sg onlyNobody reaches a server directly, even knowing its address. Every request goes through the load balancer.

The two calls that tie the load balancer to the servers:

BASH
aws elbv2 create-target-group --name jr-lesson12-tg --protocol HTTP --port 80 --vpc-id "$VPC" \
  --target-type instance --health-check-path / --health-check-interval-seconds 10 \
  --healthy-threshold-count 2 --unhealthy-threshold-count 2

aws autoscaling create-auto-scaling-group --auto-scaling-group-name jr-lesson12-asg \
  --launch-template 'LaunchTemplateName=jr-lesson12-lt,Version=$Latest' \
  --min-size 2 --max-size 4 --desired-capacity 2 --vpc-zone-identifier "$SUBNET_A,$SUBNET_B" \
  --target-group-arns "$TG" --health-check-type ELB --health-check-grace-period 90
PartWhat it does
--health-check-path /The load balancer asks each server for its home page
--health-check-interval-seconds 10Every 10 seconds. The default is 30; the lab is impatient.
--healthy-threshold-count 2, --unhealthy-threshold-count 2Two answers in a row to be called healthy; two failures in a row to be called unhealthy
--min-size 2 --max-size 4 --desired-capacity 2Never fewer than 2, never more than 4, aim for 2
--vpc-zone-identifierThe subnets, so the zones, to spread servers across
--target-group-arnsEvery server the group launches joins the target group
--health-check-type ELBReplace a server if the load balancer says it's unhealthy, not only if EC2 says it's broken
--health-check-grace-period 90Give a new server 90 seconds to start before health checks count against it

Requests, spread across servers

In the console: EC2 > Target groups > jr-lesson12-tg > Targets shows each server's health.

(Your machine)

BASH
./lb-lab.sh show
OUTPUT
== The servers
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
    i-019aa176c5fb8ebde  us-east-2b  InService    healthy
== 8 requests to http://jr-lesson12-alb-448763968.us-east-2.elb.amazonaws.com/
  1. Served by i-0f5a5626e06f9025b in us-east-2a
  2. Served by i-019aa176c5fb8ebde in us-east-2b
  3. Served by i-019aa176c5fb8ebde in us-east-2b
  4. Served by i-0f5a5626e06f9025b in us-east-2a
  5. Served by i-019aa176c5fb8ebde in us-east-2b
  6. Served by i-019aa176c5fb8ebde in us-east-2b
  7. Served by i-0f5a5626e06f9025b in us-east-2a
  8. Served by i-0f5a5626e06f9025b in us-east-2a

Two servers, one per zone, four requests each. Each server writes its own ID and zone into the page at boot, so you can see who answered. Notice the address: a load balancer has a DNS (Domain Name System) name, not a fixed IP address. Its IP addresses change as AWS scales it, so you always point at the name. Lesson 14 covers giving a site a proper name, like shop.juniperandrye-lab.com.

A server dies, and nobody does anything

In the console: EC2 > Auto Scaling groups > jr-lesson12-asg > Activity lists every launch and termination, with the reason.

(Your machine)

BASH
./lb-lab.sh heal
OUTPUT
== Before
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
    i-019aa176c5fb8ebde  us-east-2b  InService    healthy
== Terminating i-019aa176c5fb8ebde, as if it had crashed
  after   2 seconds
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
    i-019aa176c5fb8ebde  us-east-2b  InService    healthy
  after  27 seconds
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
    i-019aa176c5fb8ebde  us-east-2b  InService    not registered
  after  40 seconds
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
    i-019aa176c5fb8ebde  us-east-2b  Terminating  not registered
  after  53 seconds
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
    i-0950bef04364f04c1  us-east-2a  Pending      not registered
    i-019aa176c5fb8ebde  us-east-2b  Terminating  not registered
  after  65 seconds
    i-0950bef04364f04c1  us-east-2a  InService    initial
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
  after  78 seconds
    i-0950bef04364f04c1  us-east-2a  InService    unhealthy
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
  after 116 seconds
    i-0950bef04364f04c1  us-east-2a  InService    healthy
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
== What the Auto Scaling group says it did
  20:33:37  Launching a new EC2 instance.  Status Reason: We currently do not have sufficient t4g.micro capacity in the Availability Zone you requested (us-east-2b). Our system will be working on provisioning additional capacity. You can currently get t4g.micro capacity by not specifying an Availability Zone in your request or choosing us-east-2a, us-east-2c. Launching EC2 instance failed.
  20:33:18  Launching a new EC2 instance.  Status Reason: We currently do not have sufficient t4g.micro capacity in the Availability Zone you requested (us-east-2b). Our system will be working on provisioning additional capacity. You can currently get t4g.micro capacity by not specifying an Availability Zone in your request or choosing us-east-2a, us-east-2c. Launching EC2 instance failed.

Read it as a timeline. Everything after "Terminating" happened without anyone doing anything:

AfterWhat happened
27 secondsThe load balancer dropped the dead server from the target group. Every request since has gone to the one in 2a: the shop never went down.
40 secondsThe Auto Scaling group noticed it was below 2 and began replacing it
The two failuresIt tried 2b, to keep the zones balanced, twice. AWS had no t4g.micro servers left in us-east-2b.
53 secondsIt launched the replacement in us-east-2a instead
65 to 78 secondsRunning, but initial, then unhealthy: the load balancer checked before nginx had finished installing
116 secondsTwo healthy servers again

Zones run out of servers

Lesson 5 said to use more than one zone in case one fails. This run found the other reason: a zone can run out of a particular instance type. The group's answer was to launch in the zone that had capacity, which kept the shop at two servers, but both now sit in one zone. When capacity comes back, the group's AZ rebalance moves it back to an even spread on its own.

Teams protect against this by allowing more than one instance type in the group, so a shortage of one doesn't block launches, and by using three zones rather than two.

Running isn't ready

The new server was InService to the Auto Scaling group at 65 seconds, but the load balancer called it unhealthy at 78. Its launch script was still installing nginx. That's why the health check grace period exists: without it, the group could decide the new server had failed and replace it, which would then fail the same way. Images with everything preinstalled (Lesson 10's "In real systems") shrink this gap from minutes to seconds.

Scaling policies

In the console: EC2 > Auto Scaling groups > jr-lesson12-asg > Automatic scaling > Create dynamic scaling policy. Change desired under Details > Edit.

(Your machine)

BASH
./lb-lab.sh scale
OUTPUT
== A target tracking policy: keep average CPU near 50%
  jr-lesson12-cpu-50  TargetTrackingScaling  target 50.0% CPU
  CloudWatch alarms it created for itself: 2
== Scaling out by hand: want 3
    i-0950bef04364f04c1  us-east-2a  InService    healthy
    i-0d2c10acd25705354  us-east-2a  InService    healthy
    i-0f5a5626e06f9025b  us-east-2a  InService    healthy
== Back to 2
    i-0950bef04364f04c1  us-east-2a  InService    healthy
    i-0d2c10acd25705354  us-east-2a  InService    healthy
    i-0f5a5626e06f9025b  us-east-2a  Terminating  draining

A scaling policy changes desired for you. This one is the most common kind:

KindHow it worksFits
Target trackingYou pick a number, like 50% average CPU; it adds or removes servers to hold it thereMost things. The default choice.
Step scalingRules by size of breach: above 70%, add 1; above 90%, add 3When you want different reactions to different spikes
ScheduledSet desired at fixed timesKnown rushes: the bakery's Saturday morning
PredictiveLearns daily and weekly patterns and scales ahead of themRegular patterns with slow-starting servers

The policy made two CloudWatch alarms for itself: one to add servers when CPU runs high, one to remove them when it runs low. Lesson 32 builds alarms by hand.

The lab then changed desired by hand. At 3, a third server joined, also in 2a, with 2b still short. Back at 2, one was removed, and it showed draining: the load balancer stops sending it new requests and gives the ones in progress 30 seconds to finish, the target group's deregistration delay, before it goes.

Two meanings of "policy"

This is the first non-IAM policy in the track. AWS uses the word for two different things:

Permission policiesBehavior policies
DecideWho may do whatWhat a service does on its own
Written asJSON with Effect, Action, ResourceSettings specific to the service
ExamplesIAM policies (Lesson 3), bucket policies (Lesson 15), key policies (Lesson 34), SCPs (Lesson 36)Scaling policies (here), lifecycle policies (Lesson 15), backup plans (Lesson 19)

Take it down

In the console: EC2 > Auto Scaling groups > Delete, which terminates its servers. Then EC2 > Load balancers > Actions > Delete load balancer, Target groups > Delete, Launch templates > Delete, and the VPC.

(Your machine)

BASH
./lb-lab.sh delete

The first run left one thing behind (account number masked):

OUTPUT
== Deleting jr-lesson12-asg and its servers
== Deleted jr-lesson12-alb. Its billing stops now.

aws: [ERROR]: An error occurred (ResourceInUse) when calling the DeleteTargetGroup operation: Target group 'arn:aws:elasticloadbalancing:us-east-2:111122223333:targetgroup/jr-lesson12-tg/3825754d2bcf3a97' is currently in use by a listener or a rule
== Deleted launch template jr-lesson12-lt
== Waiting for 2 network interfaces to be released
== Deleted jr-lesson12-vpc and everything in it
== Left over from this lab
  Auto Scaling groups: 0
  load balancers:      0
  target groups:       1
  launch templates:    0
  VPCs:                0
== Things that bill by the hour, anywhere in us-east-2
  servers:             0
  load balancers:      0
  NAT gateways:        0

The load balancer said it was deleted, but its listener lingered a few seconds longer, and while it did, the target group was "in use". The same pattern as Lesson 11's endpoints: AWS finishes deleting things a little after it says it has. A target group costs nothing, so nothing was billing. The script now retries, and a second run finished it:

OUTPUT
== Deleted target group jr-lesson12-tg
== Left over from this lab
  Auto Scaling groups: 0
  load balancers:      0
  target groups:       0
  launch templates:    0
  VPCs:                0
== Things that bill by the hour, anywhere in us-east-2
  servers:             0
  load balancers:      0
  NAT gateways:        0

Order matters here, too: delete the Auto Scaling group first. Terminate its servers any other way and the group launches replacements, exactly as heal showed.

By hand: every command the script runs

The same lab without the script, in order. It leaves out tags and waiting loops; SHOW=1 ./lb-lab.sh build prints the exact calls as they run. (Your machine)

BASH
export AWS_PROFILE=juniper-rye AWS_REGION=us-east-2
MY_IP=$(curl -s https://checkip.amazonaws.com)

# Network: a VPC, an internet gateway, two public subnets in two zones
VPC=$(aws ec2 create-vpc --cidr-block 10.12.0.0/16 --query Vpc.VpcId --output text)
IGW=$(aws ec2 create-internet-gateway --query InternetGateway.InternetGatewayId --output text)
aws ec2 attach-internet-gateway --internet-gateway-id "$IGW" --vpc-id "$VPC"
RT=$(aws ec2 create-route-table --vpc-id "$VPC" --query RouteTable.RouteTableId --output text)
aws ec2 create-route --route-table-id "$RT" --destination-cidr-block 0.0.0.0/0 --gateway-id "$IGW"
SUBNET_A=$(aws ec2 create-subnet --vpc-id "$VPC" --cidr-block 10.12.1.0/24 --availability-zone us-east-2a --query Subnet.SubnetId --output text)
SUBNET_B=$(aws ec2 create-subnet --vpc-id "$VPC" --cidr-block 10.12.2.0/24 --availability-zone us-east-2b --query Subnet.SubnetId --output text)
for S in "$SUBNET_A" "$SUBNET_B"; do
  aws ec2 associate-route-table --route-table-id "$RT" --subnet-id "$S"
  aws ec2 modify-subnet-attribute --subnet-id "$S" --map-public-ip-on-launch
done

# Security groups: the servers only accept the load balancer
ALB_SG=$(aws ec2 create-security-group --vpc-id "$VPC" --group-name jr-lesson12-alb-sg \
  --description "The load balancer: web from your IP" --query GroupId --output text)
aws ec2 authorize-security-group-ingress --group-id "$ALB_SG" --protocol tcp --port 80 --cidr "$MY_IP/32"
WEB_SG=$(aws ec2 create-security-group --vpc-id "$VPC" --group-name jr-lesson12-web-sg \
  --description "Web servers: only from the load balancer" --query GroupId --output text)
aws ec2 authorize-security-group-ingress --group-id "$WEB_SG" --protocol tcp --port 80 --source-group "$ALB_SG"

# The load balancer, its target group, and a listener joining them
ALB=$(aws elbv2 create-load-balancer --name jr-lesson12-alb --type application --scheme internet-facing \
  --subnets "$SUBNET_A" "$SUBNET_B" --security-groups "$ALB_SG" --query 'LoadBalancers[0].LoadBalancerArn' --output text)
TG=$(aws elbv2 create-target-group --name jr-lesson12-tg --protocol HTTP --port 80 --vpc-id "$VPC" \
  --target-type instance --health-check-path / --health-check-interval-seconds 10 \
  --healthy-threshold-count 2 --unhealthy-threshold-count 2 --query 'TargetGroups[0].TargetGroupArn' --output text)
aws elbv2 modify-target-group-attributes --target-group-arn "$TG" --attributes Key=deregistration_delay.timeout_seconds,Value=30
aws elbv2 create-listener --load-balancer-arn "$ALB" --protocol HTTP --port 80 --default-actions Type=forward,TargetGroupArn="$TG"

# The launch template: image, size, security group, IMDSv2, and the launch script.
# lt.json holds those settings; the script builds it, with the launch script base64-encoded.
aws ec2 create-launch-template --launch-template-name jr-lesson12-lt --launch-template-data file://lt.json

# The Auto Scaling group
aws autoscaling create-auto-scaling-group --auto-scaling-group-name jr-lesson12-asg \
  --launch-template 'LaunchTemplateName=jr-lesson12-lt,Version=$Latest' \
  --min-size 2 --max-size 4 --desired-capacity 2 --vpc-zone-identifier "$SUBNET_A,$SUBNET_B" \
  --target-group-arns "$TG" --health-check-type ELB --health-check-grace-period 90

# Watching it
aws elbv2 describe-target-health --target-group-arn "$TG"
aws autoscaling describe-scaling-activities --auto-scaling-group-name jr-lesson12-asg --max-items 2

# Scaling
aws autoscaling put-scaling-policy --auto-scaling-group-name jr-lesson12-asg --policy-name jr-lesson12-cpu-50 \
  --policy-type TargetTrackingScaling \
  --target-tracking-configuration '{"PredefinedMetricSpecification":{"PredefinedMetricType":"ASGAverageCPUUtilization"},"TargetValue":50}'
aws autoscaling set-desired-capacity --auto-scaling-group-name jr-lesson12-asg --desired-capacity 3

# Taking it down, in this order
aws autoscaling delete-auto-scaling-group --auto-scaling-group-name jr-lesson12-asg --force-delete
aws elbv2 delete-load-balancer --load-balancer-arn "$ALB"
aws elbv2 wait load-balancers-deleted --load-balancer-arns "$ALB"
aws elbv2 delete-target-group --target-group-arn "$TG"       # retry if the listener isn't gone yet
aws ec2 delete-launch-template --launch-template-name jr-lesson12-lt
aws ec2 delete-security-group --group-id "$WEB_SG"           # after the servers are gone
aws ec2 delete-security-group --group-id "$ALB_SG"
aws ec2 delete-subnet --subnet-id "$SUBNET_A"
aws ec2 delete-subnet --subnet-id "$SUBNET_B"
aws ec2 delete-route-table --route-table-id "$RT"
aws ec2 detach-internet-gateway --internet-gateway-id "$IGW" --vpc-id "$VPC"
aws ec2 delete-internet-gateway --internet-gateway-id "$IGW"
aws ec2 delete-vpc --vpc-id "$VPC"

In real systems

  • Servers sit in private subnets. Only the load balancer is public; the servers reach the internet through a NAT gateway for updates. This lab put them in public subnets to skip the NAT gateway's cost, but their security group still only lets the load balancer in.
  • HTTPS ends at the load balancer, with a free certificate from AWS Certificate Manager (Lesson 14), and port 80 just redirects to 443.
  • Groups allow several instance types, so a shortage of one, like this run's, doesn't block launches.
  • Deployments replace servers rather than changing them: a new launch template version, then an instance refresh that swaps the servers a few at a time while the load balancer keeps the shop up.
  • Health checks hit a real page, often /health, that checks the app's database connection too, not just that nginx answers.

Spot the problem

Work out what's wrong before you read the explanation.

"Our servers keep getting replaced, and the new ones never become healthy." A team's Auto Scaling group launches a server, the load balancer marks it unhealthy within a minute, and the group terminates it and launches another, in a loop. The servers take three minutes to install their app at boot. The group uses --health-check-type ELB with a grace period of 30 seconds. What's wrong? The grace period is shorter than the time the app takes to start, so every server is judged before it's ready, called unhealthy, and replaced, forever. The fix: set the grace period longer than the real start-up time, such as 300 seconds, and build an image with the app preinstalled so servers start in seconds. Then check: does the group's Activity tab stop showing a launch every couple of minutes?

Keep this

RememberWhy
Load balancer, listener, target group, health checkOne address in front, healthy servers behind
Point at the load balancer's DNS nameIt has no fixed IP address
Servers allow only the load balancer's security groupNobody reaches a server directly
Launch template plus Auto Scaling groupFailed servers replace themselves
Grace period longer than start-upOr new servers are replaced before they're ready
Two or more zones, more than one instance typeZones fail, and zones run out of servers
Target tracking firstPick a number; it holds it
$16.43 a month, before trafficDelete the load balancer when you're done

Where you are now

The bakery's shop runs on a group of servers behind one load balancer. You watched requests spread across zones, a crashed server replaced in under two minutes with the shop up throughout, AWS run out of servers in one zone and the group work around it, a scaling policy set up its own alarms, and a server drain before leaving. Next, Lesson 13 takes this across zones properly, with private subnets, a NAT gateway in each zone, and connecting VPCs to each other.

Check yourself

  1. What decides whether the load balancer sends requests to a server?

  2. Why could nobody reach the servers directly, even with their public addresses?

  3. When the server in us-east-2b was terminated, where did its replacement go, and why?

  4. The new server was InService but unhealthy at 78 seconds. Why?

  5. A target tracking policy is set to 50% CPU. What does it change?

  6. Which of these is not a permission policy?

Key terms

  • Load balancer: one address that spreads requests across servers.
  • Application Load Balancer (ALB): AWS's load balancer for HTTP and HTTPS.
  • Network Load Balancer (NLB): for TCP and UDP, very high volumes, with fixed addresses.
  • Listener: the port and protocol a load balancer answers on, and where it forwards requests.
  • Target group: the servers a listener sends requests to.
  • Health check: the load balancer's regular test that a server is working.
  • Draining, or deregistration delay: the time a leaving server gets to finish its requests.
  • LCU (load balancer capacity unit): the measure of traffic a load balancer is billed for.
  • Launch template: the saved settings for launching a server.
  • Auto Scaling group: keeps a number of servers running from a launch template.
  • Minimum, maximum, desired: the group's floor, ceiling and target.
  • Health check grace period: how long a new server gets before health checks count.
  • Scaling policy: a rule that changes desired, such as target tracking.
  • AZ rebalance: the group moving servers back to an even spread across zones.

Go deeper