DataLane
← All stacks

Apache Flink

Event time, watermarks, and what exactly-once actually means

5 questions with solutions

  1. Q1UberNetflixLinkedIn

    Event time vs processing time. When does the dashboard lie?

    Solution

    Processing time windows close on wall clock. Late Kafka events fall in the wrong window. Event time plus watermarks is the honest window. If you cannot explain watermarks, you are not ready to ship the job.

  2. Q2AppleAmazonConfluent

    Checkpoint vs savepoint.

    Solution

    Checkpoints are automatic recovery. Savepoints are operator-triggered, versioned points for deploy and resize. You do not “take a checkpoint” for a migration; you take a savepoint.

  3. Q3StripePayPalCapital One

    Exactly-once into a warehouse. What do you still need?

    Solution

    A transactional or idempotent sink and a business key. Checkpoint barriers without a sink contract are at-least-once in practice. Dual-write without MERGE is a duplicate table.

  4. Q4DatabricksSnowflakeGoogle

    Flink or Spark Structured Streaming?

    Solution

    Flink for low-latency keyed state and true event-time. Spark for micro-batch ETL that happens to read Kafka. If the SLA is warehouse minutes, you may not need either — Dynamic Tables / DLT might be enough.

  5. Q5MetaSnapTwitter

    A hot key is melting one task. First move?

    Solution

    Name the key, salt or pre-aggregate, or isolate the skew. Adding task managers without fixing the key just moves the hotspot. Same answer as Spark skew.

↑↓ navigate openesc close