The whole course ▾

System Design · Lesson 1 of 39 · Week 1

What happens when you open an app

Updated 22 Oct 2026 · By Akshay, software engineer, India · 6 min read

You tap the QuickBite icon and the menu appears. Today: the hidden journey from your thumb to the server and back, in milliseconds.

Got a doubt? Ask in the comments under the video.Subscribe

QuickBite in this lesson

Day one: one phone, DNS, one server, one database.

QuickBite is the food delivery app we grow through the course, from one server to millions of orders.

The Day One setup

The Day One setup
Customer
App Server
Day 1
Orders DB
Get Menu
SQL

Welcome to the first lesson of our System Design course. Over the next thirty-nine videos, we are going to build a massive, global system together, but every great system starts in the same place: one user, one request, and one server. Imagine we are building QuickBite, a food delivery app. On day one, we have a very simple goal: a customer opens the app on their phone, and they want to see a list of nearby restaurants. It sounds like it happens instantly, but between that tap and the menu appearing, a dozen things have to go exactly right. If we don't understand this journey, we can't build the complex systems that come later in the course. So, let's look at our starting point. We have a customer with a smartphone, an app server running our code, and a database where we store the restaurant names and menus. This is the classic client-server model. The phone is the client—it asks for things. The server is, well, the server—it waits for requests and serves the data. On day one, this is all we have. It’s simple, it’s clean, and it’s where every startup begins. But even here, there is a problem. The phone is in the customer's hand, and the server is in a data center hundreds of kilometers away. How does the phone even find it?

Here is the QuickBite world on day one. The customer sends a request, the app server processes it, and the orders DB provides the data. In a perfect world, they are connected by a straight line. But in reality, the internet is a messy web of millions of machines. For the phone to talk to our server, it needs an address. Not a name like quickbite.com, but a specific number called an IP address, like 142.250.190.46. Every machine on the internet has one. Think of it like a phone number for a computer. Without it, the request has no idea where to go. But we don't want our customers to type numbers into their phones; we want them to type a name. This brings us to the very first hop of our journey: the system that turns names into numbers.

DNS: The phonebook

DNS: The phonebook
Customer
DNS
Resolver
App Server
quickbite.com?
1
142.250.x.x
2
Request
3
20-100 ms

When the customer opens QuickBite, the app first needs to find out where our server actually lives. This is the job of the Domain Name System, or DNS. Think of it as the giant, distributed phonebook of the internet. It is the very first thing that happens, and if it is slow, the whole app feels broken before the first byte of data even reaches our server.

Step one: the phone asks a DNS resolver, usually provided by the internet service provider, 'Hey, what is the IP for quickbite.com?' Step two: the resolver looks it up. If it doesn't know, it asks other servers around the world until it finds the answer, then sends that IP address back to the phone. This lookup can take anywhere from 20 to 100 milliseconds. It might not sound like much, but we haven't even started the real work yet! Once the phone has that IP address, it can finally move to step three and send the actual request to our app server. But wait—we can't just start shouting data at the server. We need to make sure the server is ready to listen, and we need to make sure the connection is private. This is where the 'handshakes' happen.

The Handshakes

The Handshakes
Customer
App Server
SYN
1
SYN-ACK
2
ACK
3
TCP: Reliability

Before we send a single restaurant name, the phone and the server need to agree on how to talk. This happens in two stages: the TCP handshake to establish a connection, and the TLS handshake to make it secure. This is the 'hello' before the conversation.

First, the TCP handshake. TCP is a protocol that ensures every piece of data arrives in the right order. It starts with a 'SYN' message from the phone, which is basically saying 'I want to talk.' The server responds with 'SYN-ACK,' meaning 'I hear you, I'm ready.' Finally, the phone sends an 'ACK,' or 'Acknowledged.' Now they have a stable connection. But we are sending credit card info and addresses for QuickBite, so we can't send it in plain text. We need TLS, which is the 'S' in HTTPS. This adds another few rounds of messages where the phone and server exchange 'keys' to encrypt the data. By the time this is done, we might have spent another 100 to 200 milliseconds just saying hello. This is why, in later lessons, we will look at ways to keep these connections open so we don't have to do this every single time.

The HTTP Request

The HTTP Request
Customer
App Server
GET /restaurants
1
200 OK + JSON
2

Finally, the connection is ready. Now the phone can ask for what it actually wants using HTTP, the language of the web. This is the part of the journey where our business logic actually begins.

The phone sends an HTTP GET request to the path '/restaurants'. This request contains 'headers'—little bits of extra info like what kind of phone it is or what language the user prefers. The server receives this, talks to the database, gets the list of pizza places and burger joints, and packages them into a format called JSON. It sends this back with a status code, like '200 OK'. If the server couldn't find the page, it might send the famous '404 Not Found'. This whole round trip—sending the request and getting the response—is what we call latency. In a fast app, we want this entire process, from DNS to the final JSON, to happen in under 500 milliseconds. If it takes 2 seconds, the user thinks the app is slow. If it takes 10 seconds, they close it and order from someone else.

In the interview

In the interview
The Request Journey
1
DNS Lookup: Name to IP
2
TCP Handshake: Reliable connection
3
TLS Handshake: Encryption for security
4
HTTP Request: The actual data ask
5
Server Processing: DB and logic
SAY THIS IN THE INTERVIEW
Arequestisaseriesofhops:
DNSfortheaddress,
TCP/TLSfortheconnection,
andHTTPforthedata.

This is a classic 'level zero' interview question: 'What happens when you type a URL into a browser?' Here is how you answer it like an engineer.

In an interview, don't just say 'it loads the page.' Break it down into these steps. Start with the DNS lookup, move to the TCP and TLS handshakes, then the HTTP request, and finally the server processing. This shows you understand the full stack, not just the code you write. Interviewers will often ask: 'Which part is the slowest?' Usually, it's the physical distance—the speed of light through fiber optic cables. If your server is in London and your user is in Bangalore, that request has to travel thousands of kilometers. That is why we use things like CDNs, which we will cover in lesson 9.

If you want to sound like a senior engineer, use this line: 'A request is a series of hops: DNS for the address, TCP and TLS for the connection, and HTTP for the data.' It shows you see the system as a sequence of distinct, measurable steps. A common mistake is forgetting the handshakes and assuming the connection is just 'there.' It's not—it's built and torn down, and that costs time.

Quick check

Quick check
?
If a user has a great internet
connection but the DNS server is
slow, what happens?
The app will feel 'stuck' or laggy before it
even begins to load data, because it can't
find the server's IP.
Remember
DNS turns names into IPs
Handshakes take time (latency)
HTTP is the data contract
Quick check

If a user has a great internet connection but the DNS server is slow, what happens?

Show the answer

The app will feel 'stuck' or laggy before it even begins to load data, because it can't find the server's IP.

Three things to take away today. First, DNS is the phonebook that turns names into IPs. Second, handshakes for connection and security take time, which we call latency. And third, HTTP is the contract where the client asks for data and the server provides it. We have our foundation. Now, we need to understand the scale of these numbers.

Practise with flashcardsYour progress stays on this device.
New System Design videos at 6 pm

Lessons on weekdays, the week's revision on Saturday, a mock interview on Sunday.