Design a pipeline to ingest, process, and query billions of events per day with second-level latency and exactly-once semantics.
- Ingestion: Kafka/Kinesis with partitions sized for throughput
- Processing: Flink/Spark Structured Streaming with checkpoints
- Storage: hot (ClickHouse/Druid/BigQuery) + cold (S3 + Parquet)
- Semantics: idempotency/outbox, watermarking, late data handling
- Serving: pre-aggregations, rollups, multi-tenant isolation
- 💡Plan for backfills and schema evolution.
- ⚠️**Underestimating Throughput Requirements:** Incorrectly sizing Kafka partitions or Kinesis shards leading to backpressure and increased latency.
- ⚠️**Failing to Configure Checkpointing Correctly:** Insufficiently frequent or improperly configured checkpoints in Flink/Spark leading to potential data loss or duplication.
- ⚠️**Ignoring Idempotency in Sink Operations:** Processed data being written to the hot store multiple times due to retries without proper idempotency checks.
- ⚠️**Complex Orchestration and Monitoring:** Lack of integrated monitoring and alerting across disparate components, making it hard to diagnose issues quickly.
- ⚠️**Assuming Default Settings are Sufficient:** Not tuning Kafka brokers, Flink/Spark configurations, or database parameters for the extreme scale and low-latency requirements.
- ❓How to handle out-of-order events?
- ❓How to guarantee exactly-once?
Ready to prove your AWS ML knowledge?
Practice with free Machine Learning Specialty (MLS-C01) exam questions. Instant answers and detailed explanations — no account required.
Start free practice quizQuestions that share similar topics with this one
Design Ad Impression & Click Tracking
AdvancedDesign an ML Feature Store
AdvancedScaling Message Queues
AdvancedExactly-Once Effects with the Outbox Pattern
AdvancedDesign a Real-Time Chat System
AdvancedDeepen your knowledge with these related blog posts
Understanding JSON Formats: JSON, JSONL, NDJSON, and More
Explore different JSON formats including JSON Lines (JSONL), Newline Delimited JSON (NDJSON), and JSON Streams with practical examples and use cases.
Aurora vs RDS PostgreSQL vs EC2: Costs, Performance & Multi-Region Compared (2025)
A brutally honest comparison of running PostgreSQL on Aurora, RDS, and EC2. We cover costs, performance, failover, global replicas, and all the tradeoffs AWS won't tell you in their marketing docs.
Multitenancy Done Right: Building Secure, Cost-Effective SaaS Applications
A battle-tested guide to implementing multitenancy without losing sleep over data leaks or AWS bills. Learn database patterns, isolation strategies, and how AI changes the game — all from someone who's seen what happens when it goes wrong.