Skip to content

Communication Patterns

Updated
17 Sept 2026
1 min read
4 sections
Page 6 of 51
System Design
Adapted from Mastering System Design from Basics to Cracking Interviews (Udemy) — https://www.udemy.com/course/mastering-system-design-from-basics-to-cracking-interviews/

How Clients and Servers Communicate

Communication follows a basic sequence:

  1. Client sends a request (HTTP, SQL, etc.).
  2. Request is transmitted over the network.
  3. Server receives and processes the request.
  4. Server sends a response.
  5. Client receives and processes the response.

The Request-Response Cycle (HTTP Example)

Browser requests https://example.com

  1. DNS resolves domain to IP

address

  1. Browser sends HTTP GET request to web server
  2. Web server processes request (queries DB if needed)
  3. Server sends HTTP response (e.g., 200 OK)
  4. Browser renders the webpage

Synchronous vs Asynchronous Communication

PatternDescriptionExample
SynchronousClient waits for a response before proceeding (Blocking).REST APIs, Traditional web apps.
AsynchronousClient doesn't wait and can perform other tasks (Non-Blocking).WebSockets, Background jobs, AJAX.

Synchronous Communication (Blocking)

Asynchronous Communication (Non-Blocking)


Stateless vs Stateful Servers

Stateless Servers

  • No memory of past interactions; each request is independent.
  • Benefits: Easily scalable, simple caching, better load balancing.
  • Example: REST APIs, HTTP servers.

Stateful Servers

  • Maintain session information across multiple requests.
  • Benefits: Personalized user experiences, seamless state tracking.
  • Example: Multiplayer games, Real-time banking.

Importance of DNS in Large-Scale Systems

DNS isn't just for naming; it's a tool for traffic management:

  • Ensuring High Availability: Load balancing using DNS.
  • DNS Failover: Automatically switching to a passive server if the primary goes down.
  • CDN Integration: Directing users to the nearest "edge" node for content delivery.