A sports media startup serves 200,000 fans with live scores, chat, and polls needing sub-second fan-out and bidirectional messages. REST polling overloaded servers and missed updates during goals. The team runs on API Gateway, Lambda, and DynamoDB. Which WebSocket and publish-subscribe design supports real-time data processing?
Select an answer to reveal the explanation.
Short Explanation
You need persistent connections plus one-to-many delivery for live spikes. Fan-out works like a stadium speaker sending one update to every seat instantly.
Full Explanation
The correct design works because API Gateway WebSocket APIs sustain persistent bidirectional sockets that remove polling overload and support upstream chat and poll votes plus downstream scores, while SNS supplies true publish-subscribe fan-out where one publish is replicated to massive subscriber sets with sub-second latency and Lambda integration for processing and DynamoDB writes. The DynamoDB Streams storage approach is standard for persistence and change capture, yet it only records scores and invokes Lambda, forcing clients to fetch results afterward, so it provides no native push broadcast and risks delay during goal spikes. The SQS FIFO queue approach is proven for ordered decoupled work between services, yet queues are point-to-point and deliver each message to a single consumer, so they cannot efficiently fan out one event to 200,000 fans without polling and sharding overhead. The CloudFront server-sent events streaming approach is common for lightweight live tickers, yet SSE is server-to-client only over HTTP, so it cannot transport bidirectional chat and polls on the same channel. Exam caveat is to classify services as broadcast versus buffer by checking whether one message is copied to many endpoints automatically or held for polling consumers. Practical check is to load-test 200,000 concurrent sockets with a simulated goal burst while measuring publish-to-receive latency, upstream delivery, Lambda concurrency, and connection-table cleanup in DynamoDB.