AI Hints
Home›System Design Tutorial›The Big Picture
System Design · Lesson 2 of 120

Clients and Servers

Who asks, who answers.

⏱ 2 min read▶ Video at 1:13🎓 Free
Watch this lesson in the System Design courseWatch on YouTube ↗Full System Design course

Almost every system you'll design is built from two roles. A client asks for something. A server answers. Your phone, your browser, and even another server can be a client.

Clients and Servers
From the video: Clients and Servers
  • A client asks
  • A server answers
  • Almost every system

One request, one response

Here's the basic pattern. The client sends a request, for example, show me my orders. The request travels over the network. The server does the work, maybe reading from a database. Then it sends back a response, and the client shows it on screen.

  1. Client asks
  2. Network
  3. Server works
  4. Database
  5. Response back
One request, one response
From the video: One request, one response

Client vs server

The two sides have different jobs. The client is close to the user. It shows things, and collects input, but you can't trust it, because users control it. The server is controlled by you. It holds the real data, checks the rules, and must be always on.

Client

  • Close to the userShows and collectsCan't be trusted

Server

  • Controlled by youHolds real dataAlways on

Summary

Clients ask, servers answer, and the network sits between them. Next, we follow one click all the way from your browser to a server and back.

Key takeaways
  • Client sends a request
  • Server sends a response
  • Never trust the client
Next up: What Happens When You Visit a Website — one click, many steps