InterviewStack.io LogoInterviewStack.io

Batch and Stream Processing Questions

Covers design and implementation of data processing using batch, stream, or hybrid approaches. Candidates should be able to explain when to choose batch versus streaming based on latency, throughput, cost, data volume, and business requirements, and compare architectural patterns such as lambda and kappa. Core stream concepts include event time versus processing time, windowing strategies such as tumbling sliding and session windows, watermarks and late arrivals, event ordering and out of order data handling, stateful versus stateless processing, state management and checkpointing, and delivery semantics including exactly once and at least once. Also includes knowledge of streaming and batch engines and runtimes, connector patterns for sources and sinks, partitioning and scaling strategies, backpressure and flow control, idempotency and deduplication techniques, testing and replayability, monitoring and alerting, and integration with storage layers such as data lakes and data warehouses. Interview focus is on reasoning about correctness latency cost and operational complexity and on concrete architecture and tooling choices.

MediumTechnical
88 practiced
Implement an efficient deduplication strategy in Python pseudocode using Apache Beam (or equivalent) that removes duplicate events based on event_id within a 24-hour sliding window while remaining memory efficient. Describe how you would use keyed state and timers, and how you would handle scale and restarts.
HardTechnical
70 practiced
Design autoscaling and resource allocation strategies for streaming jobs and GPU inference clusters that process highly variable traffic (baseline 1M events/min, occasional 10x bursts). Ensure inference latency stays under 100ms and overall cost is minimized. Address strategies like predictive autoscaling, prewarming, spot instances, and warm pools.
EasyTechnical
70 practiced
Explain backpressure and flow control in streaming systems. Describe common operational techniques to handle backpressure from downstream sinks (such as rate limiting, buffering, throttling, and circuit breakers) and how these relate to model serving components like GPU-based inference clusters.
MediumTechnical
128 practiced
Using Flink SQL (or compatible stream SQL), write a query that computes per-user total purchase amount in 1-minute tumbling windows based on an event_time TIMESTAMP column. Allow 2 minutes of lateness and emit accumulating updates to a sink. Given schema: purchases(user_id STRING, amount DOUBLE, event_time TIMESTAMP). Explain any assumptions and how to ensure correctness.
EasyTechnical
76 practiced
Define event time and processing time in the context of stream processing. Explain why event-time semantics matter for correctness in AI feature computation and give an example where relying on processing time would produce incorrect model features. Describe 2 mitigation strategies to handle late or out-of-order events.

Unlock Full Question Bank

Get access to hundreds of Batch and Stream Processing interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.