Soru

Zorluk: Çok zorPerformance and Scalability Optimization

A global sports streaming network is launching an interactive prediction platform for a major live event expecting over 15 million15\text{ million} concurrent active viewers. At key moments during the live broadcast, viewers will submit predictions, generating sudden, unannounced telemetry write spikes peaking at 2.5 million2.5\text{ million} requests per second. The system must ingest these writes without dropping connections and serve real-time leaderboard statistics with sub-millisecond latency. Which architecture meets these performance and scalability requirements with the lowest operational overhead?

  1. Deploy a Network Load Balancer (NLB) to ingest prediction traffic, routing to Amazon ECS tasks on AWS Fargate. Configure the tasks to write prediction events to Amazon Kinesis Data Streams. Process the stream using AWS Lambda in batches to aggregate predictions before updating the Amazon Aurora PostgreSQL database. Cache real-time leaderboard statistics in Amazon ElastiCache for Redis (Cluster Mode Enabled) to serve read queries.Cevap
  2. B
    Deploy an Application Load Balancer (ALB) to distribute prediction traffic to Amazon ECS tasks on AWS Fargate. Configure ECS Auto Scaling based on CPU utilization to scale tasks during the live event. Have the tasks write predictions directly to Amazon Aurora PostgreSQL, and configure Aurora Auto Scaling to dynamically provision new Aurora Replicas to handle the leaderboard read traffic.
  3. C
    Deploy a Network Load Balancer (NLB) routing to Amazon ECS tasks on AWS Fargate. Have the tasks write prediction events directly to an Amazon Aurora PostgreSQL database with Multi-AZ deployment. Scale the leaderboard read queries by routing read traffic to the passive Multi-AZ standby database instance, and configure Aurora Auto Scaling based on replication lag.
  4. D
    Deploy an Application Load Balancer (ALB) to ingest prediction traffic, routing to Amazon ECS tasks on AWS Fargate. Submit an AWS Support request to pre-warm the ALB to handle the expected peak. Configure the Fargate tasks to write predictions directly to an Amazon DynamoDB table in Provisioned Capacity Mode with Auto Scaling enabled, and deploy DynamoDB Accelerator (DAX) to cache leaderboard read queries.

Cevap

The architecture that uses a Network Load Balancer (NLB) to route to Amazon ECS tasks, writes predictions to Amazon Kinesis Data Streams, aggregates the writes in batches using AWS Lambda, updates Amazon Aurora PostgreSQL, and caches the leaderboard reads using Amazon ElastiCache for Redis (Cluster Mode Enabled).
The correct architecture uses a Network Load Balancer (NLB) which is built to handle sudden, unannounced spikes of millions of requests per second without pre-warming. By routing the prediction writes to Amazon ECS tasks that write directly to Amazon Kinesis Data Streams, the ingestion tier is successfully decoupled from the database. AWS Lambda acts as an aggregator to perform batch writes to the Amazon Aurora PostgreSQL database, preventing write exhaustion. Amazon ElastiCache for Redis (Cluster Mode Enabled) scales read operations horizontally and satisfies the sub-millisecond query latency requirement for the leaderboard.

Adım Adım Çözüm

1
Select the appropriate load balancer for sudden, unannounced spikes.
Choose a Network Load Balancer (NLB) because it is designed to handle sudden spikes of millions of requests per second without pre-warming, unlike an Application Load Balancer (ALB) which would fail to scale in time and drop connections.
To prevent connection drops during instantaneous traffic bursts.
2
Buffer the incoming high-volume writes before they reach the database.
Write prediction events directly to Amazon Kinesis Data Streams from the Amazon ECS tasks.
Amazon Kinesis Data Streams serves as a durable ingestion buffer that can scale horizontally by increasing the number of shards, avoiding database write bottlenecks.
3
Aggregate the buffered predictions to minimize database write operations.
Configure AWS Lambda to pull batches of events from Kinesis, aggregate the predictions, and perform bulk writes to the Amazon Aurora PostgreSQL database.
Writing raw events individually at a rate of 2.5 million2.5\text{ million} per second would saturate the database writer instance.
4
Scale the read queries for real-time leaderboard statistics.
Cache the real-time leaderboard statistics in Amazon ElastiCache for Redis (Cluster Mode Enabled).
ElastiCache for Redis provides sub-millisecond read latency and horizontal scaling to handle the massive viewer query volume without putting load on the primary database.

Anahtar Kavram

Handling instantaneous, massive write spikes requires decoupling ingestion from storage using a highly scalable buffer like Kinesis Data Streams, combined with an NLB for network-level scaling and ElastiCache for horizontal read scalability.
Bu soruyu puanla