A company is designing a high-performance analytics ingestion pipeline for mobile application clickstream events. During peak hours, the application generates up to events per second, with an average event size of . The events must be ingested with minimal latency, transformed from JSON to Apache Parquet format, partitioned by date and hour, and stored in Amazon S3 for query analysis using Amazon Athena. The solution must scale automatically to handle peak traffic spikes without manual intervention, ensure no data loss, and maintain an end-to-end delivery latency of under minutes. Which two steps should the solutions architect recommend to implement this architecture?
- Ingest the incoming clickstream events using Amazon Kinesis Data Streams configured in On-Demand mode to automatically scale shard capacity in response to the peak throughput.Answer
- Configure Amazon Kinesis Data Firehose with the Kinesis Data Stream as the source, enable format conversion to Apache Parquet using an AWS Glue schema, and set the buffer interval to seconds before writing to Amazon S3.Answer
- CIngest the incoming clickstream events using an Amazon SQS Standard queue, and configure Amazon Kinesis Data Firehose to pull events from the queue to write them directly to Amazon S3.
- DDeploy a provisioned Amazon Kinesis Data Stream with shards, and enable partition keys based on device ID to distribute the traffic across the shards.
- EIngest the incoming clickstream events into an Amazon SQS FIFO queue with high-throughput mode enabled, and trigger an AWS Lambda function to batch-convert the records to Parquet before writing to Amazon S3.
Answer
To build this high-performance ingestion and transformation architecture, the solutions architect should ingest the clickstream events using Amazon Kinesis Data Streams in On-Demand mode and configure Amazon Kinesis Data Firehose with the stream as the source to convert JSON to Parquet using AWS Glue with a -second buffer interval.
The correct solution uses Amazon Kinesis Data Streams in On-Demand mode to handle the ingestion. Since peak throughput is events per second (), On-Demand mode is perfect as it automatically scales up to and records per second. Amazon Kinesis Data Firehose can then be configured with the Kinesis Data Stream as its source, allowing it to natively convert the JSON payloads into Apache Parquet format using a schema from the AWS Glue Data Catalog. Setting the buffer interval to seconds guarantees that data is written to S3 within the -minute latency requirement.
Step-by-Step Solution
Key Concept
High-throughput data ingestion using Kinesis Data Streams in On-Demand mode combined with serverless format transformation via Kinesis Data Firehose and AWS Glue.
Estimated Time:3m 0s