Adapted from Mastering System Design from Basics to Cracking Interviews (Udemy) — https://www.udemy.com/course/mastering-system-design-from-basics-to-cracking-interviews/
The request lifecycle: the client sends a request over the network, the server processes it and responds, and the client renders the result.
Why is it important?
- Enables efficient resource management: Centralizing data and services on powerful servers.
- Ubiquitous: Used in web browsing, email, APIs, databases, and cloud services.
Real-world examples:
- Browsing a website: Your Browser (Client) requests a page from a Web Server (Server).
- Sending an email: Your Email App (Client) sends data to a Mail Server (Server).
Key Components of the Client-Server Model
- Client: The user-facing application that sends requests.
- Examples: Web browser, mobile app, API consumer.
- Server: A system that processes requests and returns responses.
- Examples: Web server, database server, mail server.
- Network: The medium that facilitates communication between clients and servers.
- Examples: Internet, LAN, Wi-Fi, 5G.
In modern systems, the "Server" of one request might act as a "Client" to another service (e.g., a Web Server requesting data from a Database).