Skip to content

A simple scalable web app on AWS demonstrating EC2 Auto Scaling and load balancing with a basic HTML page.

License

Notifications You must be signed in to change notification settings

Nishika10/Scalable_Web_App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

⚡Scalable Web App on AWS

Deploy a simple HTML app on EC2 with Auto Scaling + Load Balancer.
Instances scale automatically on load and serve unique pages to show distribution.

📖 Introduction

This project demonstrates a simple scalable web application hosted on AWS.
The application uses EC2 instances behind an Elastic Load Balancer (ELB) with an Auto Scaling Group (ASG) to automatically handle varying traffic loads.

The web page displays a welcome message along with the server's private IP, showing that multiple instances are running and scaling in real-time.
This project is ideal for learning AWS Auto Scaling, Load Balancing, and basic web deployment in a hands-on way.

Architecture

Here’s the architecture of the scalable web app using AWS services: Architecture Image

Description: EC2 instances are automatically scaled by the Auto Scaling Group (ASG) and placed behind an Application Load Balancer (ALB) to handle traffic efficiently.

🚀Features

  • Scalable Web App: Automatically scales EC2 instances based on traffic using AWS Auto Scaling.

  • Load Balanced: Distributes incoming traffic across multiple instances via AWS Application Load Balancer (ALB).

  • Simple HTML Page: Serves a basic web page from each EC2 instance to verify scaling.

  • Hands-On AWS Learning: Demonstrates real-world deployment concepts like EC2, ALB, and ASG.

  • Minimal Setup: Uses Launch Templates and User Data for automatic instance setup.

🖼️ Screenshots/Web Page

Here’s a view of the web page served by EC2 instances:

Web Page Screenshot

🎬 Demo

  • Visit the Application Load Balancer URL in your browser:
    http://<your-alb-dns-name>

  • You will see a simple web page:
    "Welcome to Scalable App" with the Server Private IP

  • As traffic increases, Auto Scaling launches new EC2 instances automatically

  • Refresh the page multiple times or open in different tabs to see the load distributed across instances via ALB

🌐 Deployment

  1. Launch EC2 Instance (optional for testing):
  • Use Amazon Linux 2 AMI, configure security group for SSH & HTTP
  1. Create Launch Template:
  • Set AMI, instance type, key pair, and security group
  • Add User Data script to auto-install Apache & create index.html
  1. Set up Auto Scaling Group (ASG):
  • Attach the Launch Template
  • Configure min=1, max=6 instances
  • Add desired capacity as 1
  1. Create Application Load Balancer (ALB):
  • Attach Target Group with ASG
  • Allow HTTP traffic (port 80)
  1. Test the deployment:
  • Open ALB DNS URL in browser
  • Confirm web page is served and scaling works when load increases

🛠️ Installation

  1. Clone the repository:
git clone https://github.com/your-username/scalable-web-app.git
cd scalable-web-app
  1. The EC2 instances in this project are automatically configured using User Data during launch:
  • Go to Launch Templates → Advanced Details → User Data.

  • Paste or upload your setup script there.

  • This ensures every new EC2 instance is automatically ready to serve the web page without manual installation of Apache or uploading files making the Auto Scaling Group fully automated and consistent.

📝 Lessons Learned

  • Hands-on experience with AWS Auto Scaling to dynamically adjust EC2 instances based on traffic.
  • Understanding Application Load Balancer (ALB) for distributing incoming requests across multiple servers.
  • Practical use of Launch Templates and User Data scripts to automate server setup.
  • Learned how to deploy a simple web application in a scalable and reliable way.
  • Gained insight into cloud architecture best practices for high availability and fault tolerance.

License

This project is licensed under the MIT License - see the LICENSE file for details.

👩‍💻 Author

Nishika Jaiswal

Aspiring Cloud & DevOps Engineer

About

A simple scalable web app on AWS demonstrating EC2 Auto Scaling and load balancing with a basic HTML page.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages