Soru

Zorluk: OrtaPerformance and Scalability Optimization

A logistics company is designing a high-throughput package tracking ingestion API. During peak hours, the API must handle sudden spikes of up to 150,000150,000 write requests per second. The architecture must ingest the data with minimal latency, decouple the ingestion layer from the backend database processing, and scale automatically to prevent data loss. Which two options should the solutions architect select to meet these requirements?

  1. Configure an Amazon API Gateway REST API with a direct service integration to write incoming payloads to an Amazon Kinesis Data Stream.Cevap
  2. Configure an AWS Lambda function to consume events from the Kinesis data stream in batches, and write the processed tracking events to an Amazon DynamoDB table configured with on-demand capacity.Cevap
  3. C
    Deploy an Application Load Balancer (ALB) to forward the write requests to an AWS Fargate service, relying on the default ALB auto-scaling behavior to instantly handle the traffic spikes.
  4. D
    Configure an Application Load Balancer (ALB) to route the write requests to an Amazon Aurora PostgreSQL database cluster, and configure Aurora Auto Scaling to dynamically scale reader instances to handle the incoming write load.
  5. E
    Configure Amazon API Gateway with an AWS Lambda proxy integration to process each payload and write it directly to the database, relying on default regional concurrency limits to handle the request volume.

Cevap

The correct options are the API Gateway REST API with direct integration to Kinesis Data Streams, and the AWS Lambda function consuming events from Kinesis to write to DynamoDB with on-demand capacity.
The correct architecture uses Amazon API Gateway directly integrated with Amazon Kinesis Data Streams to ingest write requests with minimal latency, buffering the traffic spike of 150,000150,000 requests per second. Decoupling ingestion from downstream database writes is then achieved by using AWS Lambda to consume from the stream in batches and store the data in Amazon DynamoDB using on-demand capacity mode to scale dynamically.

Adım Adım Çözüm

1
Select a low-latency, high-throughput ingestion layer that decouples writing from processing.
Amazon API Gateway with direct service integration to Amazon Kinesis Data Streams provides sub-millisecond integration latency and can handle massive write spikes without compute overhead.
Bypassing Lambda during ingestion minimizes write response time and safely buffers the incoming payload.
2
Process buffered events asynchronously and scale database writes dynamically.
Use AWS Lambda to consume events from the Kinesis stream in batches and write to an Amazon DynamoDB table in on-demand capacity mode.
Batch processing optimizes throughput, while DynamoDB on-demand capacity automatically scales to handle the write load.

Anahtar Kavram

Decoupling high-throughput, bursty write ingestion from backend processing using API Gateway, Kinesis Data Streams, and DynamoDB.
Bu soruyu puanla