📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Microservices Service Communication

Service Communication

5 min read Quiz at the end
Sync REST/gRPC for real-time responses; async Kafka/RabbitMQ for decoupled event-driven flows.

Service Communication Patterns

# Synchronous
# REST over HTTP  -- simple, universal
# gRPC           -- binary, fast, streaming

# Asynchronous (event-driven)
# Kafka  -- durable event streams, replay
# RabbitMQ -- message queues, routing

# Sync: A calls B, waits for response
# - Simple but creates coupling and latency chains

# Async: A publishes event, B consumes later
# - Decoupled but eventual consistency

# Event example:
order-service publishes OrderCreated to Kafka
inventory-service subscribes, reserves stock
notification-service subscribes, sends email
Topic Quiz · 1 questions

Test your understanding before moving on

1. When should you use asynchronous messaging over synchronous REST calls between services?
💡 Async messaging decouples services — the publisher does not wait for consumers to finish processing.