To achieve resilience and fault tolerance, Apache Flink® uses checkpoints with stateful functions. These checkpoints allow Flink to recover the state and position within the stream and provide failure-free execution for applications.
Essentially, a checkpoint creates a snapshot of the data stream and stores it. The snapshots then provide a mechanism to recover from unexpected job failures. Compared to traditional database systems, checkpoints are closer to recovery logs than to backups.
For more information, see the Apache Flink® documentation on checkpoints.