The High-Performance Series

How to design a system to scale to your first 100 million users

Think Big, Do Small, Learn Fast

Anh T. Dang
Level Up Coding
Published in
15 min readJun 27, 2021

--

In order to keep up with emerging techniques, I would like to update you on this story throughout the year.Last updated on 2021 Dec 23
Photo by Kirill Sh on Unsplash

It is not easy to design a system that supports hundreds of millions of users. It always is a big challenge for a software architect (but it’ll be easy from today after reading my article 🤣)

Here are some topics covered by me in this article.

  • Start with simplest: all in one.
  • The art of scalability: scaling out, scaling up.
  • Scaling a relational database: master-slave replication, master-master replication, federation, sharding, denormalization, and SQL tuning.
  • Which database to use: NoSQL or SQL?
  • Advanced concepts: caching, CDN, geoDNS., etc.
Today I don’t want to discuss general terms in high-performance computing such as fault tolerance, reliability, high availability., etc.

Keep calm, let’s start now!

Start from scratch

In the figure below, I would like to start by designing a basic app with some users. The simplest way is to deploy the entire app on a single server. This is probably how most of us get started.

  • A website (include APIs) is running on a webserver like Apache¹ (or Tomcat²).
  • A database like Oracle³ (or MySQL⁴).
We have both the webserver and the database server on the same physical machine

But there are the following disadvantages with the current architecture.

  • If the database fails, the system fails.
  • If the webserver fails, the entire system fails.

In this case, we don’t have failover and redundancy. If a server goes down, all goes down.

Using a DNS server to resolve hostnames and IP addresses

--

--

I write about things that I like and things that I don’t, mainly in the business, art and tech sphere. Sign up for my newsletter http://junryo.xyz