A company is building an online auction application where users submit bids in real time. The backend database experiences write performance issues during high-traffic spikes at the end of auctions. To ensure fairness, the bids must be processed in the exact order they are received by the application. A solutions architect needs to design a decoupled architecture that buffers incoming bids and processes them sequentially. Which solution meets these requirements with the least operational overhead?
- ASend the incoming bids to an Amazon SQS Standard queue and configure the backend service to consume and process the messages sequentially.
- BWrite the incoming bids directly to an Amazon RDS Read Replica to buffer the write traffic before replicating the data to the primary database.
- Send the incoming bids to an Amazon SQS FIFO queue and configure the backend service to consume and process the messages sequentially.Cevap
- DConfigure a continuous, long-running AWS Lambda function to poll the application servers and write the bids directly to the primary database.
Cevap
Send the incoming bids to an Amazon SQS FIFO queue and configure the backend service to consume and process the messages sequentially.
The correct solution uses an Amazon SQS FIFO queue to buffer incoming write requests (bids) and ensure they are processed in the exact order they are received. SQS FIFO queues guarantee first-in, first-out delivery and exactly-once processing, which is required for determining the auction winner fairly, while decoupling the frontend from the database to handle traffic spikes.
Adım Adım Çözüm
Anahtar Kavram
Decoupling with ordered messaging using Amazon SQS FIFO queues