DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Aws Tutorial

Introduction to AWS
AWS Global Infrastructure
Setting Up AWS
AWS IAM
AWS EC2
AWS VPC
AWS S3
AWS RDS
AWS Lambda
AWS ECS and EKS
AWS CloudWatch
AWS CodePipeline
AWS Cost Optimization
AWS Elastic Load Balancing
AWS Auto Scaling
AWS CloudFront
AWS Route 53
AWS DynamoDB
AWS ElastiCache
AWS SQS
AWS SNS
AWS EventBridge
AWS Step Functions
AWS API Gateway
AWS ECR
AWS EKS
AWS CloudFormation
AWS Elastic Beanstalk
AWS KMS
AWS Secrets Manager
AWS WAF and Shield
AWS CloudTrail
AWS Config
AWS Systems Manager
AWS Organizations
AWS EFS
AWS EBS Deep Dive
AWS Kinesis
AWS Athena
AWS CodeDeploy
AWS CodeCommit
AWS CDK
AWS SAM

AWS Elastic Load Balancing

PreviousPrev
Next

Learn how Elastic Load Balancing spreads traffic across healthy targets and how to choose ALB, NLB, or legacy CLB for AWS workloads.

AWS Elastic Load Balancing distributes incoming traffic across multiple targets so one failing instance does not take the whole application offline. For DevOps teams, it matters because it lets teams add or replace capacity behind a stable endpoint while still protecting users from unhealthy instances. Instead of relying on one fragile manual configuration, you can design a repeatable service boundary that stays stable while the workload behind it changes.

Elastic Load Balancing: Traffic Distribution

Internet / Clients
Load Balancer (ALB / NLB)
listener on port 80/443
routes to target group
Target 1
EC2 / ECS / Lambda
Target 2
EC2 / ECS / Lambda
Target 3
EC2 / ECS / Lambda
Health checks remove unhealthy targets automatically

Core ideas

The main ideas to understand are Application Load Balancer works at layer 7 and understands HTTP and HTTPS requests; Network Load Balancer works at layer 4 for TCP and UDP traffic and is built for very high performance; Classic Load Balancer is the legacy option that still appears in older environments but lacks the flexibility of newer services; and target groups, health checks, and listener rules decide where requests go and when a target should be removed from rotation. These details shape architecture decisions, but they also shape day-to-day operations. When a team chooses defaults without understanding how the service behaves under failure, scale, or security review, the platform often becomes harder to debug than the application itself.

TypeLayerBest fit
ALBLayer 7HTTP and HTTPS apps needing smart routing
NLBLayer 4TCP or UDP services needing low latency
CLBLegacyOlder stacks that have not been modernised

From an operations perspective, the goal is to pick the correct balancer type, register the right targets, and make health checks reflect real application readiness rather than a port-only probe. The comparison below highlights the choices that usually matter first. It is often better to start with a simpler design and add sophistication only after metrics, incidents, or delivery requirements prove the change is necessary.

Practical commands

aws elbv2 describe-load-balancers --query 'LoadBalancers[].{Name:LoadBalancerName,Type:Type,DNS:DNSName}' --output table
aws elbv2 describe-target-groups --query 'TargetGroups[].{Name:TargetGroupName,Protocol:Protocol,Port:Port}' --output table
aws elbv2 describe-target-health --target-group-arn arn:aws:elasticloadbalancing:REGION:ACCOUNT:targetgroup/app-tg/1234567890abcdef

Practical CLI checks make the service easier to support in real environments. Use the commands below to inspect the current state and confirm that automation matches intent. Before you promote a change, verify listener ports, target group health states, and deregistration behaviour before shifting production traffic. A safe default is graceful draining and application-level health checks that prove the dependency chain is usable. That discipline makes later troubleshooting, scaling, and security reviews far less painful.

Exercise

ELB Types

Which AWS load balancer type operates at layer 7 of the OSI model?

Exercise

Target health

What decides whether a target should continue receiving traffic from an ELB target group?

PreviousPrev
Next

Continue Learning

AWS CodePipeline

See how AWS CodePipeline coordinates CI/CD stages with CodeCommit, CodeBuild, CodeDeploy, and other services for automated delivery.

18 min·Intermediate

AWS CodeBuild

Use AWS CodeBuild as a managed build service with buildspec phases, environment variables, caching, and CodePipeline integration.

12 min·Intermediate

AWS Cost Optimization

Learn practical AWS cost optimization techniques with Cost Explorer, Budgets, Trusted Advisor, Savings Plans, and workload right-sizing.

12 min·Intermediate

Explore Related Topics

Te

Terraform Tutorials

Manage AWS infrastructure as code

Li

Linux Tutorials

Essential Linux skills for working with EC2

On This Page

Core ideasPractical commands