Synchronous vs Asynchronous Communication — Concept Check
Questions on Synchronous vs Asynchronous Communication. Sync calls couple availability (caller waits for response); async messaging decouples services via queues or topics, improving resilience but adding eventual consistency.
Questions in this quiz
8 questions on Synchronous vs Asynchronous Communication — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A microservice architecture uses synchronous HTTP calls for inter-service communication. If Service D is slow, what is a likely consequence?
- AService D will handle requests independently, without affecting others.
- BService D's delay will be mitigated by asynchronous processing.
- CService D's delay will cascade, slowing down upstream services.
- DService D's delay will only affect its own processing time.
2.In a system using Kafka for asynchronous communication, what happens if a consumer is temporarily down?
- AThe producer will stop sending messages until the consumer is back.
- BMessages queue up and are processed when the consumer restarts.
- CMessages are lost if the consumer is down.
- DMessages are processed by other consumers immediately.
3.A service uses asynchronous messaging for order processing. What is a potential drawback of this approach?
- AServices are tightly coupled, increasing failure risk.
- BDebugging becomes more complex due to lack of direct stack trace.
- CThe system cannot handle high throughput scenarios.
- DImmediate response to the user is guaranteed.
4.When should synchronous communication be preferred over asynchronous?
- AWhen the request volume is very high.
- BFor operations that can tolerate eventual consistency.
- CWhen consumers are slower than producers.
- DFor real-time queries requiring immediate response.
5.A system uses asynchronous messaging for email notifications. What advantage does this provide?
- AImmediate feedback to the user about email delivery.
- BReduced complexity in tracking message delivery.
- CIndependent scaling of email service from other components.
- DGuaranteed delivery of emails in real-time.
6.What is a key characteristic of asynchronous communication in microservices?
- AIt tightly couples the availability of services.
- BIt ensures immediate consistency across services.
- CIt requires the caller to wait for a response.
- DIt decouples services, allowing independent scaling.
7.In a hybrid architecture, which approach is typically used for commands?
- AAsynchronous communication for real-time queries.
- BAsynchronous communication for eventual processing.
- CSynchronous communication for eventual consistency.
- DSynchronous communication for immediate feedback.
8.What is a potential risk of using synchronous communication for a chain of service calls?
- AIt always improves overall system performance.
- BIt simplifies debugging across services.
- CIt ensures all services are loosely coupled.
- DIt can lead to a cascade failure if one service is down.