The System Design Newsletter

The System Design Newsletter

Share this post

The System Design Newsletter
The System Design Newsletter
Amazon Frugal Architecture Explained 💰
Copy link
Facebook
Email
Notes
More
User's avatar
Discover more from The System Design Newsletter
Download my system design playbook for free on newsletter signup
Over 154,000 subscribers
Already have an account? Sign in

Amazon Frugal Architecture Explained 💰

#56: And How to Properly Scale Your Business (5 Minutes)

Neo Kim's avatar
Neo Kim
Sep 15, 2024
109

Share this post

The System Design Newsletter
The System Design Newsletter
Amazon Frugal Architecture Explained 💰
Copy link
Facebook
Email
Notes
More
2
13
Share

Get my system design playbook for FREE on newsletter signup:


I’m writing you this letter because cost is often ignored during system design.

Yet I think good architectural decisions should always consider costs.

Otherwise even a business with a solid tech stack would fail.

  • Share this post & I'll send you some rewards for the referrals.

This post outlines Amazon’s frugal architecture principles via a hypothetical case study. You will find references at the bottom of this page if you want to go deeper.


Once upon a time, there lived 2 software engineers.

They worked for a tech company - Hooli.

Although they were smart, they never got promoted.

So they were sad and frustrated.

Frugal Architecture

Until one day when they had a wild idea to build a startup.

And posted about it on social media to find potential users - positive results.

They created the app prototype based on their assumptions from intense brainstorming sessions.

Yet there was a business risk due to high costs.

So they used Amazon’s frugal architecture as guiding principles.


This Post Summary - Instagram

I wrote a summary of this post:

(Save it for later.)

systemdesignone
A post shared by @systemdesignone

And I’d love to connect if you’re on Instagram:

Follow Instagram


Frugal Architecture

Here’s how:

1. The 80-20 Rule

Their minimum viable product (MVP) became expensive from feature creep.

Feature creep occurs when extra features are added to the product than necessary.

Deliver Only Essential Features to Reduce Build + Operational Costs
Deliver Only Essential Features to Reduce Build + Operational Costs

So they did user surveys to find the essential features. (Also asked the right questions using the mom test.)

And delivered only the necessary features to reduce costs.

The bottom line: consider cost as a non-functional requirement in system design. (It’ll improve system efficiency.)

2. Scaling Without Breaking

They added servers as the app became popular.

Profit = Revenue - Cost
Profit = Revenue - Cost

But infrastructure costs skyrocketed as more users joined.

And profit per user went down.

This could destroy their business.

So they set up autoscaling. It automatically scales up and down the infrastructure based on traffic. Thus reducing infrastructure and operational costs.

Imagine autoscaling as getting extra chairs when more people want to sit. And putting those chairs away when they leave.

Also they archived inactive data to save storage costs.

And set up rate-limiting to avoid unnecessary traffic.

The bottom line: architect the system so costs align with the business model.

3. You Can’t Control What You Don’t Measure

Their operational costs were still high.

Cost Distribution in a Typical App Lifecycle
Cost Distribution in a Typical App Lifecycle

So they set up monitoring for important metrics.

And tracked resource usage + errors.

It let them:

  • Find wasteful practices

  • Assign resources based on priorities

  • Avoid unnecessary costs quickly

Besides they found bottlenecks in the workflows and automated the solution.

The bottom line: set up monitoring to avoid unknown costs.

4. Every Decision Is a Tradeoff

They set up the database index to improve read performance.

Think of the database index as the table of contents for a database table.

Tradeoff Triangle
Tradeoff Triangle

Yet their growth rate was mind-boggling.

And their data layer wasn't stable.

So they added database read replicas to route the read traffic there.

Imagine the database read replica as the copy of a book so more people can read it at once without waiting.

The bottom line: know the tradeoffs of each architectural decision.

5. Divide and Conquer

They added features as time passed.

The Frugal Software Matrix
The Frugal Software Matrix

But managing many features at a high scale became expensive.

So they categorized services based on importance.

And implemented granular controls for different components.

  • The non-critical features got scaled down.

  • While unused features were removed.

It lets them reduce costs.

The bottom line: (1) build the app with tunable building blocks. (2) rank the services based on importance. (3) optimize important services.

6. It’s a Marathon, Not a Sprint

The media content on their app received more traffic than before. (videos and so on.)

Serving Media Content via CDN for Low Latency
Serving Media Content via CDN for Low Latency

Yet the storage and streaming costs were high.

So they stored compressed media files in an object storage.

And set up the content delivery network (CDN) for low latency.

Imagine CDN as the McDonald's fast food chain, you don't go to the main office to buy a burger. Instead nearest branch to save time.

The bottom line: (1) observe patterns. (2) optimize the system periodically.

7. We’ve Always Done It This Way

Their core microservices received extreme requests during peak traffic.

Programming Languages: Normalized Results For Energy, Time, and Memory

Yet most of their services were written in Ruby.

And the result? Bad performance.

So they built prototypes in different programming languages & profiled the performance.

Then rewrote code in Rust for 50x better performance. (Proof: Ranking programming languages by energy efficiency white paper.)

The bottom line: (1) question your assumptions. (2) pick the right tool for the job.

While they lived happily ever after.


Apollo 11 - mission to the moon used a guidance computer with only 4 KB RAM and 32 KB storage.

While mobile phones these days offer 8 GB RAM and 64 GB storage.

Apollo 11 vs Mobile Phone

So it’s not just about minimizing costs but maximizing value. Put simply, frugality leads to innovation.

The bottom line: (1) don’t ignore costs during system design. (2) set limitations on resources - time, money, CPU, and so on.


Join to get simplified case studies delivered straight to your inbox:


Author Neo Kim; System design case studies
Follow me on LinkedIn | YouTube | Threads | Twitter | Instagram

Thank you for supporting this newsletter. Consider sharing this post with your friends and get rewards. Y’all are the best.

system design newsletter

Share


How Amazon Lambda Works 🔥

How Amazon Lambda Works 🔥

Neo Kim
·
September 3, 2024
Read full story
How to Scale an App to 100 Million Users on GCP 🚀

How to Scale an App to 100 Million Users on GCP 🚀

Neo Kim
·
August 20, 2024
Read full story

References

  • AWS re: Invent 2023 - Keynote with Dr. Werner Vogels

  • The Frugal Architect

  • Achieving Frugal Architecture using the AWS Well-Architected Framework

  • AWS Well-Architected

  • Frugal innovation – a competitive advantage when resources are limited

  • Ranking Programming Languages by Energy Efficiency

  • 10 best practices to reduce your AWS RDS costs

  • What tech would the Apollo 11 mission have today?

  • How much RAM does your Android phone need in 2024?

  • Apollo Guidance Computer

  • How does database indexing work?

Bo's avatar
RomainHugues's avatar
ephraim audu's avatar
Marin Dimitrov's avatar
Pratik Falke's avatar
109 Likes∙
13 Restacks
109

Share this post

The System Design Newsletter
The System Design Newsletter
Amazon Frugal Architecture Explained 💰
Copy link
Facebook
Email
Notes
More
2
13
Share

Discussion about this post

User's avatar
Raul Junco's avatar
Raul Junco
Sep 16

Good System Design also saves and makes money because it allows you to understand the cost/value trade-offs.

Excellent article, Neo!

Expand full comment
Like (1)
Reply
Share
1 reply by Neo Kim
1 more comment...
8 Reasons Why WhatsApp Was Able to Support 50 Billion Messages a Day With Only 32 Engineers
#1: Learn More - Awesome WhatsApp Engineering (6 minutes)
Aug 27, 2023 â€¢ 
Neo Kim
742

Share this post

The System Design Newsletter
The System Design Newsletter
8 Reasons Why WhatsApp Was Able to Support 50 Billion Messages a Day With Only 32 Engineers
Copy link
Facebook
Email
Notes
More
24
How PayPal Was Able to Support a Billion Transactions per Day With Only 8 Virtual Machines
#30: Learn More - Awesome PayPal Engineering (4 minutes)
Dec 26, 2023 â€¢ 
Neo Kim
250

Share this post

The System Design Newsletter
The System Design Newsletter
How PayPal Was Able to Support a Billion Transactions per Day With Only 8 Virtual Machines
Copy link
Facebook
Email
Notes
More
14
How Stripe Prevents Double Payment Using Idempotent API
#45: A Simple Introduction to Idempotent API (4 minutes)
May 9, 2024 â€¢ 
Neo Kim
384

Share this post

The System Design Newsletter
The System Design Newsletter
How Stripe Prevents Double Payment Using Idempotent API
Copy link
Facebook
Email
Notes
More
30

Ready for more?

© 2025 Neo Kim
Publisher Privacy
Substack
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More

Create your profile

User's avatar

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.