Soru

Zorluk: Çok zorDecoupling Architectures and Event-Driven Messaging

A logistics company is designing an event-driven telemetry ingestion system to track delivery vehicles globally. The system must process location updates in the exact chronological order they are generated for each individual vehicle to ensure accurate routing history. Three downstream consumer applications—a live customer map, a fleet analytics engine, and an archival database—must independently process the same location stream in real time. The ingestion layer must scale automatically to handle sudden spikes in traffic during peak delivery hours. Which architecture meets these requirements with the least operational overhead?

  1. A
    Deploy an Amazon SNS FIFO topic to ingest the location updates, using the vehicle identifier as the Message Group ID. Subscribe three Amazon SQS Standard queues to the topic to fan out the messages to each downstream application.
  2. B
    Deploy an Amazon Kinesis Data Stream in Provisioned capacity mode, using the vehicle identifier as the partition key. Configure an AWS Lambda function triggered by Amazon CloudWatch alarms to dynamically call the UpdateShardCount API to scale shards during traffic spikes.
  3. Deploy an Amazon Kinesis Data Stream in On-Demand capacity mode, using the vehicle identifier as the partition key. Configure each downstream application as a Kinesis consumer utilizing enhanced fan-out.Cevap
  4. D
    Deploy an Amazon SQS FIFO queue to receive the location updates, using the vehicle identifier as the Message Group ID. Configure an AWS Lambda function that runs continuously in a loop to poll the queue and sequentially forward the updates to the three downstream applications.

Cevap

The architecture that uses Amazon Kinesis Data Streams in On-Demand capacity mode with vehicle identifier partition keys and enhanced fan-out consumers.
The correct solution uses an Amazon Kinesis Data Stream in On-Demand capacity mode with the vehicle identifier as the partition key. This partition key routing ensures all coordinates for a specific vehicle are sent to the same shard, preserving chronological ordering. Configuring each downstream application as an independent Kinesis consumer with enhanced fan-out allows parallel, non-blocking real-time processing of the same stream. On-Demand mode eliminates the operational overhead of manually monitoring and scaling shards during traffic spikes.

Adım Adım Çözüm

1
Analyze the ordering requirement.
Identify that location updates must be ordered chronologically per vehicle.
To ensure that routing history remains accurate, sequential consistency must be preserved using partition keys in Kinesis or message groups in FIFO systems.
2
Analyze the multi-consumer and real-time fan-out requirements.
Identify that multiple downstream consumers need to read the same event stream independently in real time.
Kinesis streams support multiple independent consumers natively, and enhanced fan-out provides dedicated read throughput to prevent lag. In contrast, standard queue systems are designed for competing consumers where each message is processed once.
3
Evaluate the scaling and operational overhead requirements.
Select On-Demand capacity mode for Kinesis Data Streams.
On-Demand mode automatically scales throughput up and down to handle unpredictable spikes in traffic without manual intervention or custom monitoring logic.

Anahtar Kavram

Real-time event streaming with ordered delivery and independent fan-out consumer scaling using Amazon Kinesis Data Streams.
Bu soruyu puanla