Scaling Heights: The AWS Adventure of Zoe and Liam 🚀
Introduction: 🌟 Hey Tech Enthusiasts! Meet Zoe and Liam, two dynamic software engineers on a mission to scale their innovative app to 10 million users using AWS. Join us on their thrilling journey, filled with tech challenges and AWS solutions.
🔍 TL;DR: This story will take you through Zoe and Liam's scaling saga from a simple MVP to a robust app serving millions, all while leveraging AWS's powerful capabilities.
1. The Dream Begins: Prelaunch Phase
Zoe and Liam had a groundbreaking app idea. In the prelaunch phase, they built a buzz-generating launch page using AWS Amplify, enjoying hassle-free hosting and zero operational costs. AWS Amplify's ease of use allowed them to focus on their MVP's core features while ensuring a smooth user experience.
2. The Big Launch
The D-day arrived, and they launched their MVP. Initially, user traffic was low, so they managed with a single Amazon EC2 instance, handling both the database and backend. They cleverly used Elastic IP and Amazon Route 53 for efficient DNS management. However, they soon realized the need for more storage and upgraded to a larger instance type for vertical scaling.
3. The First Hurdles: Ten Users
As user numbers grew, Zoe and Liam faced memory constraints with their EC2 instance. They quickly adapted by separating the database and backend onto different EC2 instances, choosing an SQL database for its robust community support and scalability up to 10 million users.
4. Expanding Horizons: Thousand Users
Then came a challenge – a power outage in their server's availability zone. They swiftly added another server in a different zone and implemented leader-follower replication for their database, ensuring high availability and resilience.
5. Scaling Up: Ten Thousand Users
With a surge to ten thousand users, the duo opted for horizontal scaling. They made their backend stateless, shifting session states to ElasticCache, and added more servers behind the load balancer. To tackle read bottlenecks, they cached popular database reads in ElasticCache.
ElasticCache is a managed Memcached or Redis.
They also moved static content to Amazon S3 and CloudFront to reduce the server load. The static content is CSS, images, and JavaScript files.
They reduced latency by caching data in CDN at edge locations.
A content delivery endpoint in a CDN network is called an Edge Location.
6. The Leap: Half a Million Users
As they hit half a million users, Zoe and Liam aimed for a 99.99% SLA. They replicated servers across multiple zones, offloaded session data to DynamoDB, and fully utilized server capacity. DynamoDB's NoSQL nature was perfect for their needs.
The next step was to move to a microservices architecture because they wanted to be able to scale services independently.
With load balancers between each layer to scale out.
They used AWS CloudFormation (This could just as easily have been something like Terraform) to create a template of the stack because it helps reduce the operational complexity.
7. The Peak 🏔️: Ten Million Users
Upon reaching 10 million users, database writes became a bottleneck. They tackled this by federating and sharding their database. They also extended their system across AWS regions, optimizing for high availability and scalability.
For some compliance requirements, high availability and scalability, they also extended the system across many AWS regions.
AWS encompasses a global network comprising 32 regions and a total of 102 availability zones.
The AWS infrastructure is segmented into regions and availability zones for scalability. A region denotes a specific geographical location containing data centers. Every region is equipped with multiple availability zones.
An Availability Zone within a region can be a singular data center or a cluster of data centers.
Availability Zones are designed with isolated networking and power sources to ensure enhanced availability and reliability.
Sky's the Limit with AWS
Zoe and Liam’s journey from a small startup to a major player demonstrates the power of AWS in scaling applications. Their story is a testament to how with the right tools and a bit of ingenuity, any dream can reach stellar heights.
📣Inspired by Zoe and Liam’s story? Start leveraging AWS for your projects and scale your dreams to new heights! Share your thoughts and experiences with AWS.
🚀 I provide an Engineering-Leader-as-a-Service to StartUps and ScaleUps
🏅I mentor aspiring and experienced Engineering Leaders
👉 View my profile to find out more: Serdar Mustafa's LinkedIn