← Microservices learning path
Microservices · Module 3 of 10

Communication between services

Use synchronous and asynchronous communication.

📖 Key ideas

  1. Synchronous: REST or gRPC request/response.
  2. Asynchronous: events and messages via Kafka, RabbitMQ, SQS.
  3. Async reduces coupling and handles spikes.
  4. Define contracts (OpenAPI, Protobuf, event schemas).
  5. Handle timeouts and partial failures.
💡 Real-life example: Synchronous calls are phone calls (wait for an answer); async messages are WhatsApp texts (reply later).
Synchronous callCaller waits for response
Asynchronous messagingFire and continue
EventNotification that something happened
ContractAgreed API or message format