An online ticketing platform accepts order submissions through a web tier that writes directly to a relational database. When a popular event opens, a flood of submissions arrives in a few minutes, the database reaches its connection limit, and customers receive errors even though orders could be processed slightly later. The team wants the front end to keep accepting every submission during the spike and to let the order processing drain at a steady rate the database can sustain, with minimal change to processing logic. Which design BEST smooths the demand against the database?
- AHave the web tier place each submission on an Amazon SQS queue and run worker compute that polls the queue and writes to the database at a steady controlled rate, decoupling intake from processing. Correct
- BIncrease the database instance to a much larger class and enable storage auto scaling so that the relational engine can absorb the entire surge of concurrent connections when the popular event opens.
- CPublish each submission to an Amazon SNS topic so the messages fan out to subscribers, which lets the web tier hand off submissions instead of writing to the database synchronously during the surge.
- DStream every submission into Amazon Kinesis Data Streams and process records with a consumer, sizing the stream shards to the peak so the platform can ingest the surge of orders as it arrives.
Why A is correct: An SQS queue buffers the burst so the web tier accepts every submission immediately, while workers pull messages and write to the database at a sustainable rate, absorbing the spike without overwhelming the connection limit and needing little change to the write logic itself.
Why B is wrong: A bigger instance raises the connection ceiling somewhat but is sized and paid for the peak the whole time, and a large enough spike still exhausts connections, so it treats the symptom rather than decoupling intake from processing.
Why C is wrong: SNS pushes messages to subscribers immediately and does not retain a backlog for paced consumption, so a slow database subscriber cannot drain at its own rate and undelivered messages are lost rather than buffered.
Why D is wrong: Kinesis can ingest the surge but is built for ordered high-throughput streaming analytics with shard capacity to provision and manage, which is heavier than needed for simple order buffering and adds operational overhead the team did not ask for.