flink-best-practices
Installation
SKILL.md
Apache Flink Best Practices
Core Principles
- Assign stable UIDs to every operator — mandatory for savepoint compatibility
- Use keyed state with TTL — unbounded state is the #1 cause of production failures
- Use event time with watermarks — processing time is non-deterministic on replay
- Use RocksDB state backend with incremental checkpoints for production
- Never do blocking I/O in operators — use
AsyncDataStream - Name every operator for debuggability in the Flink Web UI
- Deploy in Application Mode for production workloads
Application Structure (HIGH)
app-operator-uids
Assign .uid("stable-id") to every operator. This is mandatory.
Without UIDs, Flink cannot map state across job restarts or upgrades from savepoints. Missing UIDs will cause state loss on any job modification.