A logistics company is designing a high-throughput package tracking ingestion API. During peak hours, the API must handle sudden spikes of up to 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?
- Configure an Amazon API Gateway REST API with a direct service integration to write incoming payloads to an Amazon Kinesis Data Stream.Cevap
- 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
- CDeploy 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.
- DConfigure 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.
- EConfigure 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 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
Anahtar Kavram
Decoupling high-throughput, bursty write ingestion from backend processing using API Gateway, Kinesis Data Streams, and DynamoDB.