Question

Difficulty: EasyDecoupling Architectures and Event-Driven Messaging

A company is developing a ticket booking application on AWS. When a customer purchases a ticket, the system must process the payment transaction and assign a seat. To avoid double-booking and payment discrepancies, the transaction messages must be processed in the exact order they are received. The company wants to decouple the front-end application from the back-end processing service.

Which solution meets these requirements with the least operational overhead?

  1. A
    Send the transaction messages to a standard Amazon SQS queue, and configure the back-end service to consume the messages.
  2. B
    Store the transaction messages in an Amazon DynamoDB table configured with provisioned capacity mode, and have the back-end service poll the table.
  3. Send the transaction messages to an Amazon SQS FIFO queue, and configure the back-end service to consume the messages.Answer
  4. D
    Stream the transaction messages to an Amazon Kinesis data stream configured with a single provisioned shard, and configure the back-end service to process the stream.

Answer

Send the transaction messages to an Amazon SQS FIFO queue, and configure the back-end service to consume the messages.
The correct answer is to use an Amazon SQS FIFO queue. FIFO (First-In-First-Out) queues guarantee that messages are processed in the exact order in which they are sent. This native capability meets the ordering requirement with zero additional application logic and minimal operational overhead, while successfully decoupling the front-end and back-end services.

Step-by-Step Solution

1
Identify the core requirements of the system: decoupling the application components and maintaining a strict processing order of transactions.
Decoupling requires an asynchronous message queuing service (like Amazon SQS), and strict ordering requires First-In-First-Out (FIFO) delivery.
Decoupling ensures the front-end remains responsive during high load, while strict ordering prevents race conditions like double-booking.
2
Select the service that meets both requirements with the lowest operational overhead.
Amazon SQS FIFO queues natively handle message ordering and deduplication without requiring custom application logic or server management.
SQS is a fully managed service, making it the most operationally efficient choice compared to self-managed or more complex streaming solutions.

Key Concept

Using Amazon SQS FIFO queues to decouple components while ensuring strict first-in, first-out message ordering.
Rate this question