Which statement best describes synchronous communication in microservices?
Think about whether the caller pauses or not.
Synchronous communication means the caller waits for the response before moving on.
You design a payment microservice that must confirm transactions immediately to the user. Which communication style is best?
Immediate confirmation means waiting for the result.
Synchronous communication allows immediate response, suitable for payment confirmation.
Which advantage does asynchronous communication provide when scaling microservices?
Think about how waiting affects throughput.
Asynchronous communication lets services work independently, increasing throughput and scalability.
What is a key tradeoff when choosing synchronous communication over asynchronous in microservices?
Consider how waiting affects coupling and blocking.
Synchronous calls reduce latency but create tight coupling and can block services if one is slow.
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?
Calculate the excess messages arriving during peak load that the queue must hold.
During 10 seconds, 5000 msgs/sec arrive = 50000 msgs. Processing at 1000 msgs/sec = 10000 msgs processed. Queue must hold 50000 - 10000 = 40000 msgs.