Soru

Zorluk: KolayDecoupling Architectures and Event-Driven Messaging

A financial technology company is designing a transaction processing application. When a customer initiates a fund transfer, the transaction must be processed asynchronously in the exact order it was received to prevent account balance discrepancies. The architecture must decouple the frontend web portal from the backend processing servers to handle traffic peaks without losing messages. Which TWO components should a solutions architect recommend to satisfy these requirements? (Select TWO).

  1. Amazon SQS FIFO queue to store the incoming transactions in strict order.Cevap
  2. An Auto Scaling group of EC2 instances acting as backend workers that poll the queue.Cevap
  3. C
    Amazon SQS Standard queue to buffer the transaction requests.
  4. D
    Amazon RDS Read Replicas configured as the primary write target for failover.
  5. E
    Amazon DynamoDB configured with Provisioned Capacity Mode to scale dynamically for unpredictable traffic spikes.

Cevap

The correct architecture uses an Amazon SQS FIFO queue to store and sequence transaction requests, combined with an Auto Scaling group of EC2 worker instances that poll the queue to process messages asynchronously.
The correct solution leverages an Amazon SQS FIFO queue to guarantee first-in, first-out message sequencing and prevent duplicate processing, ensuring the transaction order is maintained. To handle the asynchronous processing and scaling requirements, an Auto Scaling group of EC2 worker instances polls the SQS queue and scales dynamically based on workload demand.

Adım Adım Çözüm

1
Identify the ordering constraint for the asynchronous transaction requests.
Since messages must be processed in the exact order they are received, an Amazon SQS FIFO queue is required instead of a Standard queue.
Standard queues do not guarantee message ordering, whereas FIFO queues preserve order and prevent duplicate delivery.
2
Determine the mechanism for decoupling and processing messages asynchronously.
Backend workers hosted on EC2 instances can be grouped in an Auto Scaling group to poll the SQS queue.
This allows the backend to scale independently based on the number of messages in the queue (queue depth), decoupling the front-end submission from the backend processing.

Anahtar Kavram

Decoupling message-driven architectures while guaranteeing strict message ordering using Amazon SQS FIFO queues.
Bu soruyu puanla