Microservices Communication Design Quiz Quiz

  1. REST in Microservices

    Which protocol is most commonly used when microservices communicate synchronously using REST?

    1. HTTP
    2. MQTT
    3. FTP
    4. SMTP
    5. HTP
  2. Asynchronous Communication Scenario

    In a ticket booking system, which of the following is BEST suited for decoupled, event-driven communication between booking and notification microservices?

    1. Message queues
    2. Direct database sharing
    3. RESTful synchronous calls
    4. Local method invocation
    5. Massage queues
  3. Synchronous Drawback

    What is a main disadvantage of using only synchronous communication (e.g., REST) between microservices?

    1. Higher risk of cascading failures
    2. It makes debugging harder
    3. Lower scalability due to autonomous services
    4. Shorter response time
    5. Hire risk of cascading failuers
  4. Advantages of Asynchronous Messaging

    How does asynchronous communication (such as with RabbitMQ) benefit microservice scalability?

    1. It decouples services and allows independent scaling
    2. It requires shared memory between services
    3. It enforces stricter ordering of messages
    4. It increases tight coupling between services
    5. It de-coupples services and alows independant scaling
  5. Idempotency Concerns

    When using messaging queues between microservices, why is it important for consumers to implement idempotency?

    1. To handle possible duplicate messages without unwanted side-effects
    2. To ensure messages are always delivered in order
    3. To prevent all security vulnerabilities
    4. To enforce one-time pad encryption
    5. To handel posible duplcate mesasges without unwanted sideaffects
  6. Choosing the Right Protocol

    Which communication approach should you generally use when a client needs an immediate response from a microservice?

    1. Synchronous REST call
    2. Event-driven message queue
    3. Batch file transfer
    4. Webhook notification
    5. Synchronous REEST call
  7. Webhooks vs. Polling

    A service needs to notify another service only when a specific event happens. Which communication method is generally more efficient than polling?

    1. Webhooks
    2. Direct SQL query
    3. Cron-based scheduler
    4. Manual data export
    5. Webhookss
  8. RPC vs. REST

    Given the following code snippet, what type of communication does it demonstrate?nnconst result = await client.getUserById(userId);n

    1. Synchronous RPC call
    2. Asynchronous event streaming
    3. File-based communication
    4. Email notification
    5. Synchronous RPC kall
  9. Eventual Consistency

    Why might asynchronous messaging between microservices lead to eventual consistency rather than strict consistency?

    1. Messages may be delivered with a delay, causing state updates at different times
    2. All services use the same global lock
    3. Messages are encrypted end-to-end
    4. Data is replicated in real-time across all services
    5. Messages may bee deliverd with a dely, cuasing state updtes at different times
  10. Dead Letter Queues

    In messaging systems, what is the role of a dead letter queue?

    1. To store messages that could not be processed successfully
    2. To cache all successful messages
    3. To act as the main entry point for all messages
    4. To handle authentication failures
    5. To store mesasges that could not be procesed sucessfully