<aside>

This section is part of the 5-hour Microservices course by Mukul Raina

Section 4: Inter-Service Communication

SLIDE 44: Section Intro

Section 4: Inter-Service Communication

Once you have drawn service boundaries (Section 3), the next question is immediate: how do these services talk to each other? The answer to this question is not a technology choice. It is an architecture decision that determines coupling, latency, failure behavior, and consistency across your entire system.

Choosing REST vs gRPC vs message queues is not about which technology is “better.” It is about which communication pattern matches the coupling and consistency requirements of each specific interaction. A system typically uses multiple patterns for different interactions.

What We Will Cover:

  1. Synchronous vs asynchronous communication and the trade-offs of each
  2. REST, gRPC, and GraphQL for synchronous communication
  3. Message queues and event streams for asynchronous communication
  4. Commands vs events and why the distinction matters
  5. Resilience patterns: timeouts, retries, circuit breakers, bulkheads, and backpressure
  6. Contract versioning and schema evolution for independent deployment
  7. Correlation IDs for tracing requests across services
  8. A decision framework for choosing the right pattern

Where This Appears in Real Systems:

In a platform like Uber, the Rider App uses REST to request a ride. The Dispatch Service uses gRPC internally for low-latency driver matching. The Trip Service publishes events to a stream (like Kafka) that the Payment Service, Analytics Service, and Notification Service consume independently. A single ride request uses at least three different communication patterns. This section teaches you when and why to use each.

<aside>

Mukul Raina | youtube.com/@mukulraina | slides.mukulraina.com | LinkedIn

</aside>