Which statement correctly describes the difference between synchronous and asynchronous communication in microservices?
Think about whether the sender waits for the receiver to reply before moving on.
Synchronous communication means the sender waits for the receiver's response before continuing. Asynchronous communication allows the sender to continue without waiting.
You have two microservices: one handles user authentication and the other processes payments. Which communication method is best when the payment service must confirm user identity before processing?
Consider if the payment service needs immediate confirmation before continuing.
Synchronous HTTP calls are best when the payment service must wait for user authentication confirmation before processing payments.
Which benefit does asynchronous communication provide when scaling microservices?
Think about how asynchronous communication affects service independence and load handling.
Asynchronous communication lets services work independently and not wait for each other, which helps handle more requests and recover from failures.
What is a common tradeoff when using message queues for microservice communication?
Consider what message queues add and what challenges they introduce.
Message queues help decouple services and improve reliability but add complexity and can cause delays due to asynchronous processing.
You expect 10,000 requests per minute between two microservices communicating asynchronously via a message queue. Each message is about 1 KB. What is the minimum required throughput of the message queue in MB per second?
Calculate total KB per minute, convert to MB, then divide by 60 seconds.
10,000 messages/min ร 1 KB = 10,000 KB/min = 10 MB/min. 10 MB รท 60 sec โ 0.167 MB/s.