internalsGet Pro

Module 10 · Lesson 5 of 13Pro

Stateful stream processing and state backends

Level
Advanced
Topic
Stream processing with Flink
Reading time
18 min

When you finish this page you can

  1. Explain what keyed state is, where Flink keeps it, and why some state is cleaned up on its own and some never is.
  2. Size a job’s state from its keys and decide when it needs a time-to-live.
  3. Choose between the heap and RocksDB state backends from state size, access cost and checkpoint size.
  4. Configure RocksDB with incremental checkpoints and state TTL for a Flink 2.3 job.

Builds on 3 lessons

Start with lesson 317 min
  1. Windows: tumbling, sliding and session17 min
  2. Watermarks: deciding when late events stop counting17 min
  3. Sessionization: grouping events into visits with SQL17 min

The dashboard froze at 14:20 on Monday

is an online store in India. Its apps send about 200 million click events a day to the Kafka topic kartly.clicks. A Flink job, live-dashboard, reads them and feeds the live festival dashboard in ClickHouse. Every 10 seconds it writes product views and add-to-carts per product. It also marks each click that starts a new shopping session, so the dashboard can show sessions started every 10 seconds.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan