A global smart-grid utility company is deploying a system to monitor smart meters. At exactly 00:00 UTC each day, every meter uploads a JSON status payload via HTTPS to a telemetry endpoint. The system must process this data and store it in an Amazon Aurora PostgreSQL database for daily reporting. The telemetry ingestion endpoint experiences a sudden traffic spike, surging from a baseline of under requests per second (RPS) to over RPS within seconds. Which architecture provides the most performant and scalable design to ingest and process this data without dropping requests?
- Deploy an Application Load Balancer (ALB) that routes incoming requests to an Amazon ECS service running on AWS Fargate. Have the ECS tasks ingest the payloads directly into an Amazon Kinesis Data Stream. Configure a separate ECS service to consume data from Kinesis and perform batched writes to the Aurora PostgreSQL database. Contact AWS Support to pre-warm the ALB with the anticipated traffic profile.Cevap
- BDeploy an Application Load Balancer (ALB) that routes incoming requests to an Amazon ECS service running on AWS Fargate. Rely on the ALB's built-in automatic scaling to adapt to the daily traffic spike, and configure Auto Scaling for the ECS service based on CPU utilization. To handle the database write pressure, configure Aurora Auto Scaling to dynamically launch Aurora Replicas during the ingestion window.
- CDeploy an Application Load Balancer (ALB) that routes incoming requests to an Amazon ECS service running on AWS Fargate. Configure the ECS tasks to write payloads directly to the Aurora PostgreSQL database. Set up Amazon ElastiCache for Memcached to cache database queries and reduce database lock contention. Configure the ALB with an aggressive target tracking scaling policy based on target response time.
- DDeploy an Application Load Balancer (ALB) that routes incoming requests to an Amazon ECS service running on AWS Fargate. Contact AWS Support to pre-warm the ALB. Configure the ECS tasks to write payloads directly to the Aurora PostgreSQL database. To scale the write throughput, configure Aurora Global Database write forwarding and distribute the telemetry data writes across multiple secondary AWS Regions.
Cevap
Deploy an Application Load Balancer (ALB) that routes incoming requests to an Amazon ECS service running on AWS Fargate. Have the ECS tasks ingest the payloads directly into an Amazon Kinesis Data Stream. Configure a separate ECS service to consume data from Kinesis and perform batched writes to the Aurora PostgreSQL database. Contact AWS Support to pre-warm the ALB with the anticipated traffic profile.
The correct solution addresses the network layer bottlenecks by pre-warming the Application Load Balancer (ALB) through AWS Support, ensuring it can handle the sudden RPS load. It also addresses the database layer bottleneck by introducing Amazon Kinesis Data Streams to buffer the telemetry payloads, allowing the backend tasks to perform efficient batch inserts into Aurora PostgreSQL instead of direct, high-frequency, single-record writes.
Adım Adım Çözüm
Anahtar Kavram
Handling flash traffic spikes requires pre-warming the load balancing layer and decoupling the database writes from the ingestion API using a message queue or data stream to buffer the load.