This project demonstrates how to build a highly available web application on AWS using an Application Load Balancer (ALB) and multiple EC2 instances deployed across multiple Availability Zones.
Instead of relying on a single server, incoming HTTP traffic is distributed across multiple EC2 instances, improving fault tolerance, reliability, and scalability.
- Deploy multiple EC2 instances to host a web application
- Configure an Application Load Balancer to distribute traffic
- Implement health checks using a target group
- Achieve high availability using Multi-AZ architecture
- Amazon EC2 โ Virtual servers to host the web application
- Application Load Balancer (ALB) โ Distributes incoming HTTP traffic
- Target Groups โ Routes traffic to healthy EC2 instances
- Amazon VPC โ Isolated networking environment
- Public Subnets (Multi-AZ) โ Ensures high availability
- Internet Gateway โ Enables internet access
- Security Groups โ Controls inbound and outbound traffic
- Apache Web Server โ Serves HTTP requests
The architecture follows a real-world production design:
- Internet-facing Application Load Balancer
- Target Group with health checks
- Two EC2 instances deployed in different Availability Zones
- Public subnets connected through an Internet Gateway
๐ Architecture diagram is available in the architecture/ folder.
- Launched two EC2 instances in different Availability Zones
- Installed and configured Apache web server on both instances
- Created a target group with HTTP health checks
- Registered EC2 instances to the target group
- Created an internet-facing Application Load Balancer
- Configured listener rules to forward traffic to the target group
- Verified traffic distribution using the ALB DNS name
- Application Load Balancer successfully distributes traffic
- Requests are served alternately by EC2 instances
- Target group health checks show all instances as Healthy
- High availability and fault tolerance achieved
Step-by-step screenshots showing configuration and results are available in the screenshots/ folder.
A demo video showing live load balancing is available in the demo/ folder.
- Difference between single-instance and load-balanced architecture
- Importance of health checks and Availability Zones
- Practical understanding of ALB and target groups
- Real-world AWS networking and security concepts
- Integrate Auto Scaling Group (ASG)
- Enable HTTPS using AWS Certificate Manager (ACM)
- Add monitoring and alarms using Amazon CloudWatch
Adhithyan Sivaraman T
AWS & Cloud Computing Enthusiast