Inter-Service Communication Patterns
Examine various communication patterns (synchronous, asynchronous) and technologies used between microservices.
Microservices Need to Talk
In a microservices architecture, your application is broken into many small, independent services. For these services to work together and deliver a complete user experience, they must communicate with each other.
This communication is called inter-service communication. It's how one service requests data or triggers actions in another.
Direct Calls: Synchronous Communication
Synchronous communication is like a direct phone call. When Service A needs data from Service B, it sends a request and then waits for Service B to respond before continuing its own work.
- Request-Response Model: Service A waits for a response from Service B.
- Blocking: Service A is blocked (cannot do other work) until the response arrives.
All lessons in this course
- Decomposing Monoliths
- Service Discovery & Registry
- Inter-Service Communication Patterns
- The Saga Pattern for Distributed Transactions