Breaking Down Scale: Memory, Bandwidth & Load in Simple Terms

Hi Curious Heads! πŸ‘‹
If you have followed the series, you would have seen how quickly we fall into issues as we scale…

First one thing struggles to keep up, and shortly it is all a forest fire πŸ”₯ in our VPCs!

To mitigate this, we need to have an idea of growth rates πŸ“ˆ and point of failures ❌ to ensure we can scale correctly as per need and not waste our money πŸ’Έ to random scaling just to keep things running…


What do we call this step?

Ans: Back-of-the-envelope Estimations 🧾


Why?

Because they are so simple πŸ’‘ that we can do them on the go β€” over an envelope βœ‰οΈ or even a paper napkin 🍽️ once we’re good enough on our numbers and thinking πŸ’―.


Let’s Practice This

Let’s take a simple, well-known app to use as a reference β€”
YouTube πŸŽ₯πŸ™‚


πŸ’‘ What are we dealing with here?

Entities (oversimplified):

  • Users
  • Videos
  • Comments

Types of Data:

  • User Content
  • Users Metadata
  • Video Metadata
  • Comments Metadata
  • Global Distribution
  • Video Analytics (likes/views/etc.)

πŸ” Translate Architecture to Needs

ComponentResource Need
Content DistributionNetwork Bandwidth 🌐
User + Comments + Video MetadataDatabase Storage πŸ—ƒοΈ
VideosObject Storage πŸ“¦

Now comes the fun part β€” breaking things down πŸ’₯


🧠 Memory Estimations (Storage)

User Table

  • One record = 40 Bytes
  • 1 Million Users β†’
    1,000,000 x 40B = 40,000,000 Bytes β‰ˆ 40MB

User Content

  • One record = 80 Bytes
  • If each user posts 10 items β†’
    1M x 10 x 80B = 800,000,000 Bytes β‰ˆ 800MB

And we haven’t even included indexing, caching, or relational tables yet!


πŸ“Ά Bandwidth Estimations (Traffic)

Let’s assume each video view streams 2MB data on average.
If we have 500K Daily Active Users (DAU), each watching 5 videos/day:

  • 500K x 5 x 2MB = 5,000,000 MB = 5 TB/day 😳
    That’s 150 TB/month just in outgoing traffic β€” and that’s just views, not uploads!

βš™οΈ System Load Estimations (Throughput)

  • 1M Users β†’ ~500K DAU
  • One server can handle 50K concurrent connections

So:
500K / 50K = 10 servers minimum πŸ–₯️
Add redundancy, spikes, and background jobs and the number easily doubles.


🎯 Why It Matters?

These back-of-the-envelope estimations don’t need to be perfect β€” but they give you a gut-check framework to know what’s coming your way.

They help you:

  • Avoid over-engineering early πŸ› οΈ
  • Plan for realistic resource costs πŸ’΅
  • Communicate ideas clearly to teams or stakeholders πŸ§‘β€πŸ’»

Next time you think “Will our system handle this?”,
Don’t panic β€” pull out that napkin and do the math πŸ’―πŸ§Ύ


See you in the next one!
– Anmoldeep πŸ‘¨β€πŸ’»

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top