What Is the Client-Server Model? The Basics of Request and Response
The baseline to compare WebSocket and SSE against
The most traditional and widely used architecture. It follows a unidirectional flow where the client sends a request and the server responds, with HTTP/HTTPS being the most representative protocol.
Architecture Diagram
🌐
Browser
📱
Mobile App
Request
→
←
Response
🖥️
Server
API / Web Server
↔
🗄️
Database
Flow Description
- Client sends HTTP request to server
- Server receives request and executes business logic
- Query/store in database as needed
- Server returns response to client
How It Works
1
Client sends HTTP request to server (GET, POST, etc.)
2
Server receives and processes the request
3
Server queries database / executes business logic
4
Server returns HTTP response to client
Pros
- ✓ Simple to implement
- ✓ Easy to debug
- ✓ Caching can be utilized
- ✓ Standardized protocols
Cons
- ✗ Server can become a bottleneck
- ✗ Difficult to do real-time updates
- ✗ Service disruption when server goes down
- ✗ Client must always initiate the request
Use Cases
Web applications (Browser ↔ Web server)
REST API
GraphQL API
Mobile app backend