0
0
Microservicessystem_design~20 mins

Synchronous vs asynchronous communication in Microservices - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Communication Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding communication types in microservices

Which statement best describes synchronous communication in microservices?

AThe services use batch processing to exchange data periodically.
BThe caller sends a message and continues without waiting for a response.
CThe services communicate only through shared databases.
DThe caller waits for the response before continuing its process.
Attempts:
2 left
💡 Hint

Think about whether the caller pauses or not.

Architecture
intermediate
2:00remaining
Choosing communication style for a payment service

You design a payment microservice that must confirm transactions immediately to the user. Which communication style is best?

ASynchronous communication with direct API calls.
BAsynchronous communication using message queues.
CBatch processing every hour to update payment status.
DUsing shared database polling for updates.
Attempts:
2 left
💡 Hint

Immediate confirmation means waiting for the result.

scaling
advanced
2:00remaining
Scaling microservices with asynchronous communication

Which advantage does asynchronous communication provide when scaling microservices?

AIt allows services to handle requests independently without waiting, improving throughput.
BIt requires synchronous locks to maintain data consistency.
CIt forces all services to be tightly coupled for faster response times.
DIt reduces the need for load balancing by processing requests sequentially.
Attempts:
2 left
💡 Hint

Think about how waiting affects throughput.

tradeoff
advanced
2:00remaining
Tradeoffs between synchronous and asynchronous communication

What is a key tradeoff when choosing synchronous communication over asynchronous in microservices?

ASynchronous communication improves fault tolerance but increases latency.
BSynchronous communication reduces latency but can cause tight coupling and blocking.
CSynchronous communication eliminates the need for retries and error handling.
DSynchronous communication always scales better than asynchronous.
Attempts:
2 left
💡 Hint

Consider how waiting affects coupling and blocking.

estimation
expert
3:00remaining
Estimating system capacity for asynchronous messaging

A microservice system uses asynchronous messaging with a queue that processes 1000 messages per second. If peak load is 5000 messages per second for 10 seconds, what minimum queue size is needed to avoid message loss?

A5000 messages
B10000 messages
C40000 messages
D6000 messages
Attempts:
2 left
💡 Hint

Calculate the excess messages arriving during peak load that the queue must hold.