A financial analytics platform is designing an ingestion pipeline to capture real-time stock ticker updates from external market feeds. During periods of high volatility, the stream is expected to peak at updates per second, with an average update payload size of . The solutions architect must design a solution that ingests this data with sub-second latency, preserves the strict chronological order of updates for each individual stock ticker symbol, and writes the processed updates to an Amazon DynamoDB table. Which ingestion architecture should the solutions architect choose to support the peak load?
- Configure an Amazon Kinesis data stream with shards in Provisioned mode, using the stock ticker symbol as the partition key. Use an AWS Lambda function to consume records from the stream and write them to the DynamoDB table.Cevap
- BConfigure an Amazon Kinesis data stream with shards in Provisioned mode, using the stock ticker symbol as the partition key. Use an AWS Lambda function to consume records from the stream and write them to the DynamoDB table.
- CConfigure a standard Amazon SQS queue to capture the incoming updates. Use an AWS Lambda function to poll the queue, sort the updates by stock ticker symbol, and write them to the DynamoDB table.
- DConfigure the market feeds to write updates directly to the Amazon DynamoDB table using the AWS SDK, utilizing the update timestamp as the partition key.
Cevap
The architecture using an Amazon Kinesis data stream with shards in Provisioned mode, with the stock ticker symbol as the partition key, and consumed by an AWS Lambda function to write to DynamoDB.
The correct solution calculates the shard count by evaluating both the record write limit ( records/sec per shard) and the throughput write limit ( per shard). To support records/sec at each ( total), a minimum of shards is required. Furthermore, using the stock ticker symbol as the partition key ensures that all updates for a given ticker are routed to the same shard and processed sequentially, maintaining order.
Adım Adım Çözüm
Anahtar Kavram
Kinesis Data Streams shard capacity calculations and partition key design for message ordering.
Tahmini Süre:1m 30s