Scaling Heights: The AWS Adventure of Zoe and Liam 🚀
Tags: aws, scale, infrastructure, cloud
Published: 2024-01-18 17:30:51

---
title: Scaling Heights: The AWS Adventure of Zoe and Liam 🚀
published: true
date: 2023-12-08 11:41:17 UTC
tags: aws, scale, infrastructure, cloud
canonical_url: https://sidmustafa.substack.com/p/scaling-heights-the-aws-adventure
---

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70547afd-b9a9-47bc-84b6-9e662026f554.heic)
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70547afd-b9a9-47bc-84b6-9e662026f554.heic)

**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.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52c0bb16-d299-4e07-a6c1-6793e4ec17f2_1089x465.png)
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52c0bb16-d299-4e07-a6c1-6793e4ec17f2_1089x465.png)

### **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.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0ece283-55c6-4b16-b046-c2e47656a4b0_1103x463.png)
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0ece283-55c6-4b16-b046-c2e47656a4b0_1103x463.png)

### **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.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd25c84a-ea9b-44ad-a913-da68aeae560f_800x768.png)
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd25c84a-ea9b-44ad-a913-da68aeae560f_800x768.png)

### **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.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd031dff6-705b-4b48-b416-19d43f322063_1122x800.png)
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd031dff6-705b-4b48-b416-19d43f322063_1122x800.png)

### **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.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd61ff3fa-4fbc-4e87-9040-952294bfd305_1107x195.png)

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd61ff3fa-4fbc-4e87-9040-952294bfd305_1107x195.png)

> _ElasticCache_ is a managed Memcached or Redis.
> 
> [
> ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F685fee89-7cea-408b-89be-5650fed0d5a7_1096x298.png)
> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>
> 
> ](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F685fee89-7cea-408b-89be-5650fed0d5a7_1096x298.png)
> 
> They also moved static content to Amazon S3 and CloudFront to reduce the server load. The static content is CSS, images, and JavaScript files.
> 
> [
> ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F621de4c6-9bbd-416f-9cf2-402c41c50d3e_1102x154.png)
> 
> ](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F621de4c6-9bbd-416f-9cf2-402c41c50d3e_1102x154.png)

> They reduced latency by caching data in CDN at edge locations.
> 
> A content delivery endpoint in a CDN network is called an **Edge Location.**

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7370e1-584d-4550-a1eb-7c8c3fcfb17f_1120x803.png)
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7370e1-584d-4550-a1eb-7c8c3fcfb17f_1120x803.png)

### **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.

[
 ![Monolith vs Microservice](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d03e9d-082d-4cea-a63f-b747962d10a1_1106x810.png "Monolith vs Microservice")
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1d03e9d-082d-4cea-a63f-b747962d10a1_1106x810.png)
_Monolith vs Microservice_

The next step was to move to a microservices architecture because they wanted to be able to scale services independently.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefacaac5-b116-495f-adf6-83c86313a6c5_1111x143.png)

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefacaac5-b116-495f-adf6-83c86313a6c5_1111x143.png)

With load balancers between each layer to scale out.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe278d30b-c53e-4b76-a034-aae000226666_1107x115.png)

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe278d30b-c53e-4b76-a034-aae000226666_1107x115.png)

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.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d4b53f2-cd2b-4d2a-921b-438f44ee3673_1089x243.png)

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d4b53f2-cd2b-4d2a-921b-438f44ee3673_1089x243.png)
_They federated the DB based on business domain_

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a30a0-a666-49d6-ac3c-9805044fcf67_1101x255.png)

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a7a30a0-a666-49d6-ac3c-9805044fcf67_1101x255.png)
_Then split datasets across many servers to scale out.._

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.

[
 ![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb73ea72-8467-499a-bd39-3fb31480d3a9.heic)
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg>

](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb73ea72-8467-499a-bd39-3fb31480d3a9.heic)

## **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.

[Leave a comment](https://sidmustafa.substack.com/p/scaling-heights-the-aws-adventure/comments)

[Subscribe now](https://sidmustafa.substack.com/subscribe?)

* * *

🚀 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](https://www.linkedin.com/in/serdar-mustafa/)

[Refer a friend](https://sidmustafa.substack.com/leaderboard?&utm_source=post)

[Share](https://sidmustafa.substack.com/p/scaling-heights-the-aws-adventure?utm_source=substack&utm_medium=email&utm_content=share&action=share)