Self-Assessment Quiz: Real-Time and Streaming Architecture

Twenty questions. Aim for 16 or more. Questions 1, 9, and 12 are the three that decide whether you build the right thing and whether it works.


Question 1

The question that resolves most "we need real time" requests is:

  • A. What is your budget?
  • B. If this arrived thirty minutes later, what would go wrong?
  • C. How many events per second?
  • D. Which framework do you prefer?

Question 2

A workload needs streaming when:

  • A. Data arrives continuously
  • B. A decision is made per event, by code, with no human in the loop
  • C. Executives asked for it
  • D. Competitors have it

Question 3

Micro-batch is described as under-used because it delivers:

  • A. Identical latency to streaming
  • B. ~95% of the latency benefit at ~20% of the complexity
  • C. Better correctness than batch
  • D. Lower infrastructure cost than batch

Question 4

Lambda's fatal problem was:

  • A. It was too slow
  • B. You maintain the same business logic twice, and the two paths disagree
  • C. It required Kafka
  • D. It could not handle late data

Question 5

Kappa's fatal problem was:

  • A. It needed two code paths
  • B. It assumed the log holds everything
  • C. It could not do exactly-once
  • D. It required Flink

Question 6

Which piece of Lambda survives as a useful technique?

  • A. Two code paths
  • B. A fast approximate answer plus a slow correct one
  • C. The serving layer
  • D. Batch reprocessing only

Question 7

A watermark is:

  • A. A guarantee that all earlier events have arrived
  • B. An assertion — a heuristic — that you believe you have seen everything before time T
  • C. The current processing time
  • D. A checkpoint marker

Question 8

Of the three questions a watermark forces, which is not a streaming question?

  • A. How long do I wait?
  • B. What happens to what arrives after?
  • C. What do downstream consumers do with a correction?
  • D. All three are streaming questions

Question 9

A watermark across parallel partitions is:

  • A. The maximum of the per-partition watermarks
  • B. The minimum
  • C. The average
  • D. Per-partition only

Question 10

Therefore one idle partition:

  • A. Is ignored
  • B. Stalls window emission for every partition, while the job looks healthy
  • C. Causes an error
  • D. Increases consumer lag

Question 11

Which metric would have caught Case Study 1's stall?

  • A. Consumer lag
  • B. Checkpoint age
  • C. A freshness assertion on the sink
  • D. CPU utilization

Question 12

"Exactly-once" correctly stated means:

  • A. Each record is delivered once
  • B. The effects of processing each record appear once, though it may be delivered many times
  • C. No duplicates exist anywhere
  • D. The source guarantees uniqueness

Question 13

It is achieved by a transactional sink or:

  • A. A larger checkpoint interval
  • B. An idempotent sink — Chapter 20 §20.3, unchanged
  • C. Disabling retries
  • D. At-most-once delivery

Question 14

The guarantee does not cover:

  • A. The job's own state
  • B. Writes to a participating sink
  • C. An external API call the job makes
  • D. Checkpoint recovery

Question 15

A one-hour sliding window advancing every minute holds each event in:

  • A. One window
  • B. Sixty windows
  • C. Two windows
  • D. It depends on the key

Question 16

A deduplication set without a state TTL:

  • A. Is fine
  • B. Grows forever, and the job dies months later with an unattributable OOM
  • C. Is cleared at each checkpoint
  • D. Is bounded by the watermark

Question 17

A join window should be sized from:

  • A. The observed lag distribution
  • B. What the business permits — how long after an order can a payment legitimately arrive
  • C. The available memory
  • D. The watermark delay

Question 18

advance_watermark_to in a test harness matters because:

  • A. It speeds up the test
  • B. Event time is data, so the test controls the clock and is deterministic
  • C. It flushes buffers
  • D. It simulates backpressure

Question 19

Which of §29.9's five test cases is most often missing?

  • A. The happy path
  • B. Out-of-order arrival
  • C. A late event outside allowed lateness, asserting the drop is counted
  • D. A window with no events

Question 20

Deploying a stateful streaming job requires that:

  • A. The job is stopped and restarted
  • B. A savepoint is taken and the new job can read the old state
  • C. Parallelism is unchanged
  • D. The topic is recreated

Answer Key

1. B — §29.1. Three of the four answer clusters do not need streaming.

2. B — §29.11. Volume, an unavoidable stream source, or value decaying in seconds are the other three.

3. B — §29.2. And Chapter 20's incremental machinery works unchanged.

4. B — §29.3. And the two paths disagree, producing incidents where nobody can say which number is right.

5. B — §29.3. Replaying two years requires two years in the log, a job faster than the accumulation, and a sink that tolerates the rewrite.

6. B — §29.3. The mistake was making it the architecture rather than a technique — a cached dashboard with a nightly reconciliation is the same pattern.

7. B — §29.4. You cannot know, so it is always a heuristic.

8. C — §29.4. It is a contract question (Chapter 17), and a consumer that cannot handle a restatement will silently double-count.

9. B — §29.5. A window cannot be complete until every partition has passed it.

10. B — §29.5 and Case Study 1. Two hours forty minutes of no output, every night, with every job metric green.

11. C — Case Study 1. Consumer lag of zero is the actively misleading signal — it means "we have read everything available," which is what a job that reads and buffers looks like.

12. B — §29.6. Exactly-once delivery is impossible: you cannot distinguish a lost message from a lost acknowledgment.

13. B — §29.6. And the idempotent sink is usually simpler, requiring no transactional coordination at all.

14. C — §29.6's 🔁 callout. External calls, non-participating sinks, and anything downstream.

15. B — §29.5. The single most common cause of state being larger than predicted.

16. B — §29.7. And 26 hours, not 24 — a TTL equal to the window drops keys at the boundary.

17. B — §29.8's 📐 callout. Kestrel's observed p99.9 was 42 seconds and the business answer was three days — which established it was not a streaming join at all.

18. B — §29.9. Deterministic, milliseconds, and it exercises cases that would take hours to occur naturally.

19. C — §29.9. A test that asserts the event is dropped and does not assert the counter incremented passes on a job with no counter.

20. B — §29.10. Which is why you set explicit operator UIDs from version one, before you need them.


Topic map

Missed Reread
1, 2 §29.1, §29.11 — what latency is required
3 §29.2 — the spectrum
4, 5, 6 §29.3 — Lambda and Kappa
7, 8 §29.4 — watermarks
9, 10, 11, 15 §29.5 and Case Study 1 — windows and idleness
12, 13, 14 §29.6 — delivery guarantees
16 §29.7 — state
17 §29.8 — joins
18, 19 §29.9 — testing
20 §29.10 — operating and deploying