Microservices Interservice Communication Strategies 2 — Questions and Answers
Question 1: Which communication style introduces the tightest temporal coupling between two microservices?
- Synchronous request/response (Correct answer)
- Asynchronous messaging via a broker
- Event streaming with replay
- Fire-and-forget pub/sub
Correct answer: Synchronous request/response
Synchronous request/response requires both services to be available at the same time, creating temporal coupling.
Question 2: What is the primary benefit of using a message broker like RabbitMQ between services?
- It decouples producers and consumers in time and space (Correct answer)
- It guarantees zero network latency
- It removes the need for serialization
- It eliminates the need for service discovery
Correct answer: It decouples producers and consumers in time and space
A broker buffers messages so producers and consumers do not need to interact directly or simultaneously.
Question 3: In a request/response REST call, which HTTP status code best signals that the caller should retry later?
- 503 Service Unavailable (Correct answer)
- 400 Bad Request
- 404 Not Found
- 401 Unauthorized
Correct answer: 503 Service Unavailable
503 indicates a transient unavailability, making it a retryable condition.
Question 4: Which pattern lets a client make a single call that a gateway fans out to multiple backend services?
- API composition / aggregation (Correct answer)
- Database-per-service
- Strangler fig
- Bulkhead isolation
Correct answer: API composition / aggregation
API composition aggregates results from several services behind one client-facing endpoint.
Question 5: What does gRPC use as its default serialization format?
- Protocol Buffers (Correct answer)
- JSON
- XML
- YAML
Correct answer: Protocol Buffers
gRPC uses Protocol Buffers, a compact binary format, by default.
Question 6: Which approach avoids blocking the caller's thread while waiting for a downstream response?
- Asynchronous (non-blocking) communication (Correct answer)
- Synchronous polling in a loop
- Sequential blocking calls
- Two-phase commit
Correct answer: Asynchronous (non-blocking) communication
Asynchronous communication frees the caller to continue work instead of waiting.
Question 7: Why is point-to-point synchronous chaining of many services often discouraged?
- Latency and failure probability compound across the chain (Correct answer)
- It reduces total network calls
- It guarantees stronger consistency
- It removes the need for timeouts
Correct answer: Latency and failure probability compound across the chain
Each hop adds latency and another point of failure, so long synchronous chains become fragile.
Which communication style introduces the tightest temporal coupling between two microservices?