Solution Architecture Journey: Scaling a Simple Web Application
Introduction
In this architecture discussion, we explore how a simple web application, WhatIsTheTime.com, evolves from a basic single-instance setup to a highly available, scalable, and cost-optimized cloud architecture using AWS EC2, Elastic Load Balancing (ELB), Route 53, and Auto Scaling Groups (ASG).
Phase 1: Basic Setup
1. Initial Proof of Concept (PoC)
- The simplest version of the app consists of:
- A T2 Micro EC2 instance with a public IP.
- A user requests the time, and the server responds.
- To maintain a static IP, we attach an Elastic IP.
🟢 Pros: Simple and functional.
🔴 Cons: Limited capacity, potential downtime if the instance stops.
Phase 2: Vertical Scaling
2. Upgrading to a Larger Instance
- Due to increasing traffic, the T2 Micro is insufficient.
- The instance is upgraded to an M5 Large instance.
- Downtime occurs during the upgrade process.
🟢 Pros: More powerful instance, better performance.
🔴 Cons: Downtime during upgrade, limited by the largest instance available.
Phase 3: Horizontal Scaling
3. Adding Multiple EC2 Instances