Updated on 28 Oct, 20256 mins read 15 views

In this article we will assume we are the owner of an website which is deployed on a server. It currently has no end users. We will gradually scale it up to serve the millions of users.

Big picture: what “scale” means

Scaling  = keeping the system usable as load (users, requests, data) grows.

That means:

  1. Performance (latency stays low)
  2. Throughput (system handles more requests/sec)
  3. Availability (uptime & resilience)
  4. Cost-efficiency (don't spend forever)
  5. Maintainability (you can change it safely)

We will manage these by making architecture choices and operational investments over time.

Single Server Setup

Initially everything runs on a single server. Journey of a thousand miles begins with a single step.

hld_single_server_setup
 Let's understand the request flow in the single server setup:
hld_single_server_setup_request_flow
As you can see from the diagram above:

  1. User enters the website name, such as the www.example.com, The request goes to the Domain Name System (DNS) Server, which is a 3rd party server. It is known as the phonebook of the internet and has the mapping of the domain names and their corresponding server IP address.
  2. DNS Server returns the IP address of the entered domain name. For our case it return 202.20.77.
  3. Now we have the IP address of the server. Then HTTP request are sent directly to the web server.
  4. The web server handles the request and returns either HTML pages or JSON response.

Learn more about HTTP Request over here: 

[buttons link="https://thejat.in/learn/http-request" button_text="HTTP Request" target="2" class="page_speed_1427743882"][/buttons]
Buy Me A Coffee

Leave a comment

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