1h 16m read

Flink Checkpoint Alignment: How to Diagnose Delays

Flink Checkpoint Alignment can expose backpressure delays. Compare start delay, buffers and unaligned checkpoints before tuning a production job.

Flink Checkpoint Alignment: How to Diagnose Delays

Alignment duration is the time between a subtask processing the first and the last checkpoint barrier, and it grows when the barriers cannot keep pace with the data they travel with. Because a checkpoint completes only when the last subtask acknowledges it, one slow subtask can hold the whole checkpoint open. Long alignment durations therefore usually mean barrier-propagation delay — processing backpressure, a large volume of buffered in-flight data, or a single long-running record — while checkpoint-storage latency shows up in the async phase and state snapshotting shows up in the sync phase.

This article separates those causes, runs them through a numbered diagnostic checklist you can re-execute on another cluster, and ends with a copyable configuration and REST template. Metric definitions, defaults and preconditions below follow the Apache Flink stable documentation branch (accessed 2 December 2026), and each is linked to the page that carries it.

How Does Checkpoint Alignment Work Alongside a Unified Streaming and Batch Data Path?

Flink injects checkpoint barriers at the sources, and those barriers travel in-band with the records rather than over a separate control channel (From Aligned to Unaligned Checkpoints, Part 1). When the first barrier reaches the head of an input queue, the subtask enters the alignment phase: it stops consuming from the channels that already delivered a barrier and waits until every input channel has delivered one. It then snapshots its state, forwards the barrier downstream, and unblocks its inputs.

Three properties of that mechanism drive everything below. Alignment blocking applies only to exactly-once checkpoints, Flink's default; with at-least-once checkpoints, barriers do not block channels, so alignment duration means something different. Because barriers share the data path, barrier speed is bounded by data speed, and backpressure slows the barrier as well as the records. And because a checkpoint completes only when the last subtask acknowledges it, end-to-end duration is a maximum across subtasks rather than an average (Monitoring Checkpointing).

The same design decouples stream transport from persistence, which is what lets one runtime offer both a low-latency streaming exchange and a decoupled batch exchange. The Flink material cited here does not describe lakehouse-specific checkpoint internals, so treat alignment as a property of the Flink job's barrier mechanism wherever its output lands. Teams whose Flink job exists mainly to feed or transform lakehouse tables can weigh where that work runs: Singdata Lakehouse states a single-engine position across real-time lake integration and warehouse workloads, and the Spark replacement solution sets out how that engine consolidates the layers a stream processor would otherwise sit beside.

Why Does Alignment Time Grow? Separating Backpressure, State Snapshot I/O, and Network Transport

Alignment duration and start delay rising together on the same subtasks point at barrier propagation. When the synchronous or asynchronous phase dominates the end-to-end duration instead, the delay sits in snapshotting state or writing to checkpoint storage, and alignment settings will not move it. Under heavy backpressure, the dominant factor in the end-to-end time of a checkpoint can be the time to propagate checkpoint barriers to all operators and subtasks, which is observable as high alignment time and start delay (Checkpointing under backpressure).

The candidate causes fall into three families:

  • Processing backpressure. A downstream stage cannot keep up, network buffers fill, and the barrier queues behind records the subtask has not consumed.

  • The state snapshot phases. Snapshotting operator state (sync) and writing it to storage (async) dominate end-to-end duration when the job is otherwise healthy, and they appear as sync and async duration rather than as alignment duration.

  • In-flight data volume. In aligned checkpoints, barriers travel along with the network buffers, so more buffered in-flight data lengthens barrier propagation; in unaligned checkpoints that same in-flight data enlarges the checkpoint size instead (Network buffer tuning).

Read the components in one order: alignment duration and start delay point at propagation; sync duration points at snapshotting state on the subtask; async duration points at writing to checkpoint storage and, for unaligned checkpoints, also includes waiting for the last barrier and persisting in-flight data (Monitoring Checkpointing).

Candidate cause

Primary metric signature

Confirming check

Addressing action

Easy to misread because

Downstream backpressure

High alignment duration and start delay on the blocked subtasks

Back-pressure monitoring on the subtask with the longest alignment duration; trace where backpressure terminates

Remove the backpressure source: optimize the job, adjust configuration, or scale up

The long duration is a symptom; alignment settings do not remove it

Slow synchronous state snapshot

Sync duration dominates end-to-end duration; alignment duration stays low

Compare sync duration across subtasks and inspect state volume, timers and state backend

Reduce per-subtask state cost; consider incremental checkpoints where the backend supports them

It is often blamed on alignment because both appear in the same checkpoint record

Slow checkpoint storage writes

Async duration dominates; sync duration stays low

Check the storage behind the checkpoint directory and whether size columns are deltas

Fix or move the checkpoint storage, or reduce what is written per checkpoint

Unaligned checkpoints add I/O to state storage, so they make this row worse

Excessive in-flight buffers

High alignment duration on aligned checkpoints; nonzero processed in-flight data when unaligned

Read the debloating metrics estimatedTimeToConsumeBuffersMs and debloatedBufferSize where debloating is enabled

Reduce buffered in-flight data through buffer debloating or manual tuning

Debloating caps buffer size; it does not reduce buffer count or network memory usage

Single long-running record

Alignment or async duration spikes that track individual records rather than sustained load

Look for operators emitting many records per input record, or windows firing many timers at once

Restructure that operator or accept the limit; alignment settings alone will not fix it

A subtask cannot be interrupted mid-record, so unaligned checkpoints still wait for it

Which Metrics and Configuration Keys Should You Check First?

Fix this shortlist before you open the Web UI. The numbered steps below read only these fields and keys, which is what makes the diagnosis reproducible by another engineer on another cluster.

Where Do Start Delay, Alignment Duration, and Sync/Async Duration Come From?

Alignment duration is the time between processing the first and the last checkpoint barrier; for aligned checkpoints, the channels that already received a barrier are blocked during that interval. Start delay is the time it took for the first barrier to reach this subtask after the barrier was created. Sync duration covers snapshotting operator state and blocks all other activity on the subtask, including processing records and firing timers. Async duration covers writing the checkpoint to the selected filesystem and, for unaligned checkpoints, also includes the wait for the last barrier and persisting in-flight data (Monitoring Checkpointing). Processed (persisted) in-flight data, the approximate bytes handled during alignment, can be greater than zero only when unaligned checkpoints are enabled.

Two caveats belong with those definitions. Metrics for failed checkpoints are updated on a best-efforts basis and may be inaccurate, so no diagnosis should rest on a single failed entry. And the History tab remembers only web.checkpoints.history entries, 10 by default, which caps the baseline available in the UI and is the practical reason to also pull the REST API or a metrics reporter.

Which Configuration Keys Change Alignment Behaviour?

Read these keys from the job's effective configuration, in this order. Values in brackets are the documented defaults (Checkpointing).

  1. execution.checkpointing.interval — the base interval at which checkpoints are scheduled; it has no default. Triggering may be delayed by execution.checkpointing.max-concurrent-checkpoints [1], execution.checkpointing.min-pause [0 ms], and execution.checkpointing.interval-during-backlog, which must be either 0, disabling checkpoints during backlog, or at least the interval value, and applies when any source reports isProcessingBacklog=true.

  2. execution.checkpointing.timeout [10 min] — the maximum time a checkpoint may take before being discarded.

  3. execution.checkpointing.tolerable-failed-checkpoints [0]. It applies to IOException on the JobManager, failures in the async phase on TaskManagers, and checkpoint expiration by timeout; a sync-phase failure on a TaskManager always forces failover of the affected task.

  4. execution.checkpointing.unaligned.enabled [false] — can only be enabled when execution.checkpointing.mode is EXACTLY_ONCE and max-concurrent-checkpoints is 1, and it is only relevant alongside those settings.

  5. execution.checkpointing.aligned-checkpoint-timeout [0 ms] — at 0, checkpoints always start unaligned; a positive value starts aligned and falls back to unaligned when the start delay exceeds the timeout.

  6. The buffer debloating keys taskmanager.network.memory.buffer-debloat.enabled, .target, .period, .samples, .threshold-percentages, documented in the network memory tuning guide.

This is a reading list for the steps that follow, not a set of settings to change together.

What Do You Need Before You Start Diagnosing?

Confirm each of these first, because each one changes what a metric means.

  • Read access to the Flink Web UI or REST API for the running job, including checkpoint history and per-subtask statistics.

  • The job's effective configuration, not the code defaults: interval, min-pause, max-concurrent-checkpoints, timeout and the unaligned settings interact, and the running configuration is what the metrics reflect.

  • A metrics reporter or an exported checkpoint history covering at least ten completed checkpoints. The UI keeps only web.checkpoints.history entries by default, and the Overview and Summary statistics are reset if the JobManager fails over.

  • The state backend in use and whether execution.checkpointing.incremental is enabled, because with incremental checkpoints the size shown in the UI or REST API represents a delta rather than the full checkpoint state.

  • The checkpoint storage location and its observed write behaviour, since async duration points there, and the retention setting execution.checkpointing.externalized-checkpoint-retention if you need a checkpoint retained across a change (Checkpoints).

  • A way to reproduce the load pattern outside production, plus a savepoint or a retained externalized checkpoint before any configuration change.

Before starting, name the single checkpoint-history field you will read first and the value that would make you stop.

How Do You Diagnose Alignment Delays Step by Step?

Work in order and stop at the first step that explains the delay. Each step names what to read and the observation that confirms or eliminates that cause.

  1. Freeze a baseline. Export the checkpoint history — ID, status, trigger time, latest acknowledgement, end-to-end duration — for at least ten completed checkpoints. Confirms: that a single outlier checkpoint cannot drive the conclusion.

  2. Read the trigger side first. Compare the gaps between successive trigger times with execution.checkpointing.interval, then check max-concurrent-checkpoints, min-pause and interval-during-backlog. Confirms: whether the delay is in triggering rather than in execution.

  3. Classify the checkpoint mode. Read the per-subtask unaligned flag and the configured aligned-checkpoint-timeout. Confirms: whether the checkpoints you measured started aligned or switched to unaligned, since the same duration means different things in each mode.

  4. Decompose the duration per subtask. Open More details and read start delay, alignment duration, sync duration and async duration for every subtask. Confirms: which single component dominates, and on which subtask.

  5. Test for backpressure before blaming anything else. Compare the subtask holding the longest alignment duration against back-pressure monitoring, and trace downstream to where backpressure terminates. Confirms: that the slowest subtask is genuinely backpressured. If the pressure originates in a source connector, upstream consumer lag metrics such as Kafka consumer lag show it before the Flink operator does. When that connector captures change data, the trade-offs between binlog, trigger and polling capture are compared in Singdata's guide to MySQL CDC patterns for lakehouse ingestion.

  6. Localise state snapshotting. If sync duration dominates, inspect the state backend, the volume of keyed and operator state, timers and RocksDB usage (Tuning Checkpoints and Large State). Confirms: the cost is snapshotting state on the subtask, not waiting for barriers.

  7. Localise checkpoint-storage I/O. If async duration dominates, inspect the storage behind the checkpoint directory and whether the reported size columns are deltas rather than full state size. Confirms: storage latency, not runtime scheduling, is the binding constraint.

  8. Localise in-flight data. Read processed (persisted) in-flight data and, where buffer debloating is enabled, estimatedTimeToConsumeBuffersMs and debloatedBufferSize. Confirms: the barrier is queued behind buffered data rather than behind slow processing. If the same pipeline also feeds continuously ingested lakehouse tables, the related cost to watch is set out in Singdata's guide to lakehouse small files, compaction and streaming latency.

  9. Rule out single-record blocking. Look for operators that emit many records per input record, windows firing many timers at once, and records too large for one network buffer. Confirms: whether a subtask cannot be interrupted mid-record, which bounds what unaligned checkpoints can achieve.

  10. Change one thing, then re-measure. Apply exactly one mitigation, wait for the same number of completed checkpoints as in step 1, and compare the same fields. Confirms: the change, rather than load drift, moved the metric.

Aligned or Unaligned Checkpoints: Which Should You Use Under Backpressure?

Enable unaligned checkpoints when checkpoint durations are very high because of backpressure, and leave them off when I/O to state storage is already the bottleneck during checkpointing (Checkpointing under backpressure). Unaligned checkpoints contain the data stored in buffers as part of the checkpoint state, which allows barriers to overtake those buffers, so checkpoint duration becomes largely independent of the current throughput.

Four documented boundaries change the answer. Concurrent unaligned checkpoints are not supported, and savepoints cannot run concurrently with them, so savepoints take slightly longer. Unaligned checkpoints break an implicit watermark guarantee on recovery: Flink generates watermarks after it restores in-flight data, so an operator that applies the latest watermark on each record can produce different results than under aligned checkpoints and needs the watermark stored in operator state. Barrier handling can still be delayed when a single record takes a long time to process. And unaligned checkpoints are disabled for pointwise and broadcast connections, while all other exchanges still run unaligned. Two further keys are worth reading: execution.checkpointing.unaligned.forced covers the documented special case of iterative jobs, and execution.checkpointing.during-recovery.enabled (default false) requires execution.checkpointing.unaligned.recover-output-on-downstream.enabled and reduces the window of vulnerability to failures during recovery.

Aspect

Aligned checkpoints

Unaligned checkpoints

Barrier handling

A subtask stops consuming from channels that already delivered a barrier until all input channels deliver one

Barriers overtake buffered in-flight data, so duration becomes independent of throughput

In-flight data

More buffered data lengthens barrier propagation time

In-flight data is persisted as part of checkpoint state and enlarges checkpoint size

State-storage latency

Appears in async duration, which writes the checkpoint to the selected filesystem

Adds I/O to state storage, so it is the wrong choice when storage is the bottleneck

Concurrency

Bounded by execution.checkpointing.max-concurrent-checkpoints

Concurrent unaligned checkpoints are not supported; savepoints cannot run concurrently

Recovery semantics

Watermarks are generated as the first step of recovery

Watermarks are generated after in-flight data is restored, which can change results for watermark-dependent operators

Supported connections

All connections

Disabled for pointwise and broadcast connections; other exchanges still run unaligned

The documented remediation options are to remove the backpressure source, reduce the amount of buffered in-flight data, or enable unaligned checkpoints. They are not mutually exclusive and can be combined, and the source does not rank them as a fixed sequence.

What Does a Reproducible Configuration and Diagnostic Template Look Like?

The template below uses only Apache Flink configuration keys and REST endpoints; lakehouse-side configuration is out of scope, so nothing here implies a vendor feature. The prerequisites are the ones listed earlier — the job's effective configuration, at least ten completed checkpoints of history, and a savepoint or retained checkpoint before any change.

# Apache Flink keys only. Comments state the documented default or the setting
  # under test; the template reports values, it does not assert a target runtime.
  execution.checkpointing.interval: 10 min                  # no default; base schedule interval
  execution.checkpointing.mode: EXACTLY_ONCE                # default; AT_LEAST_ONCE removes alignment blocking
  execution.checkpointing.max-concurrent-checkpoints: 1     # default 1; must be 1 for unaligned checkpoints
  execution.checkpointing.min-pause: 0 ms                   # default 0 ms
  execution.checkpointing.timeout: 10 min                   # default 10 min
  execution.checkpointing.tolerable-failed-checkpoints: 0   # default 0
  execution.checkpointing.incremental: false                # default false; when enabled, reported sizes are deltas
  execution.checkpointing.unaligned.enabled: false          # default false; requires EXACTLY_ONCE and max-concurrent 1
  execution.checkpointing.aligned-checkpoint-timeout: 0 ms  # default 0 ms: starts unaligned; positive value starts aligned and falls back
  taskmanager.network.memory.buffer-debloat.enabled: true    # enable buffer debloating to bound in-flight data
  web.checkpoints.history: 10                               # default 10; UI history depth
  
# Flink monitoring REST API. In an HA setup each JobManager serves its own
  # instance, so call the current leader. Replace the host, port and job id.
  BASE="http://<jobmanager-host>:<port>"
  JOB="<job-id>"
  
  # Checkpoint history, including per-subtask statistics
  curl -s "${BASE}/jobs/${JOB}/checkpoints" | jq .
  
  # Effective checkpoint configuration for this job
  curl -s "${BASE}/jobs/${JOB}/checkpoints/config" | jq .
  

Endpoint names for your Flink version are listed in the REST API reference, where the monitoring API and its per-JobManager availability in high-availability setups are documented.

How the blocks map to the checklist: the configuration keys feed steps 2, 3 and 10; the checkpoint history call feeds steps 1, 4 and 8; the checkpoint configuration call feeds steps 2 and 3.

What Mistakes Make Alignment Delay Investigations Go Wrong?

  • Enabling unaligned checkpoints while storage I/O is the bottleneck. Unaligned checkpoints add I/O to state storage; confirm async duration and storage behaviour first.

  • Treating alignment duration as the whole checkpoint cost. If sync or async duration dominates, alignment is not the binding constraint.

  • Reading incremental checkpoint sizes as full state size. With execution.checkpointing.incremental enabled, the size columns represent the delta, and the documentation says so explicitly.

  • Expecting concurrent unaligned checkpoints. They are not supported, and savepoints cannot run concurrently with them.

  • Assuming alignment blocking applies to at-least-once checkpoints. Only exactly-once checkpoints block channels during alignment.

  • Generalising one subtask's figure to the job. End-to-end duration is determined by the last subtask to acknowledge, so it is a maximum across subtasks.

  • Trusting failed-checkpoint metrics. The documentation describes the metrics for failed checkpoints as updated on a best-efforts basis and possibly inaccurate.

  • Trusting buffer debloating defaults everywhere. Its documentation flags subtasks with multiple different inputs or a single unioned input, and parallelism above roughly 200, as cases needing verification; debloating also caps buffer size without reducing buffer count or network memory usage.

Commercial disclosure: Singdata publishes a lakehouse platform whose stated positioning is a single engine that replaces separate Spark, Flink and warehouse layers (Spark replacement solution); its published performance comparisons are vendor-reported and are documented with methodology in the Singdata Lakehouse performance comparison for readers who want to reproduce them.

How Do You Verify the Alignment Delay Is Actually Fixed?

Sign off against the values you captured in step 1, not against one green checkpoint.

  • The previously slow subtask's alignment duration and start delay sit inside the range you set before the change.

  • The latest acknowledgement that determines end-to-end duration no longer comes from the same outlier subtask.

  • End-to-end duration sits comfortably inside execution.checkpointing.timeout rather than close to it.

  • The failed-checkpoint count is consistent with the failure reasons execution.checkpointing.tolerable-failed-checkpoints covers.

  • Restored jobs still meet the semantics you rely on — relevant if unaligned checkpoints were enabled, because Flink generates watermarks after restoring in-flight data on recovery.

Require a stable run of completed checkpoints under the same load pattern before declaring the diagnosis resolved. Ten completed checkpoints, the working baseline used here, is a reproducibility choice rather than a documented threshold.

FAQ

These five questions cover the checks above; each answer stands on its own.

How do I tell whether a long alignment duration comes from backpressure, state snapshot I/O, or network constraints?

Read the per-subtask fields first: alignment duration and start delay isolate barrier propagation, sync duration isolates snapshotting operator state on the subtask, and async duration isolates writing the checkpoint to storage — and, for unaligned checkpoints, also the wait for the last barrier and persisting in-flight data (Monitoring Checkpointing). In-flight data volume lengthens aligned barrier propagation but enlarges unaligned checkpoint size instead (Network buffer tuning). Because alignment can also rise simply because a downstream stage is slow, confirm backpressure on the subtask holding the longest alignment duration before you attribute the delay to it and start changing configuration.

What is the practical difference between aligned and unaligned checkpoints, and when should I enable unaligned checkpoints?

Aligned checkpoints block the channels that already delivered a barrier until every input channel has delivered one; unaligned checkpoints store the buffered in-flight data as part of the checkpoint state, so barriers overtake that data and duration becomes largely independent of throughput (Checkpointing under backpressure). Use unaligned checkpoints when checkpoint durations are very high because of backpressure, and not when I/O to state storage is already the bottleneck during checkpointing. Enabling them requires execution.checkpointing.mode to be EXACTLY_ONCE and max-concurrent-checkpoints to be 1, and they are disabled for pointwise and broadcast connections, with the remaining exchanges still running unaligned.

Which configuration keys and metrics should I check first when diagnosing alignment delays?

Read the per-subtask fields in the checkpoint history first — alignment duration, start delay, sync duration, async duration, and the unaligned-checkpoint flag — as defined in the checkpoint monitoring documentation. Then read the keys that govern when a checkpoint runs and in which mode: execution.checkpointing.interval together with execution.checkpointing.min-pause and execution.checkpointing.max-concurrent-checkpoints, then execution.checkpointing.timeout and the unaligned settings listed in the checkpointing configuration reference. Because the Web UI keeps only web.checkpoints.history checkpoints (default 10), export the same fields from the REST API or a metrics reporter when you need a longer baseline.

How does checkpoint alignment behave in a unified batch-and-streaming lakehouse compared with a standalone streaming job?

Alignment is a property of the barrier mechanism, not of whatever storage holds the snapshot: Flink's checkpoint design decouples stream transport from persistence, which is what lets one runtime offer both a low-latency streaming exchange and a decoupled batch exchange, as described in the checkpointing walkthrough. The Apache Flink material cited here does not document lakehouse-specific checkpoint internals, so there is no separate alignment algorithm to expect in a unified deployment. The metrics and steps in this article apply to the Flink job itself, whatever consumes the tables it writes.

What makes a checkpoint alignment diagnosis reproducible across environments?

A reproducible run fixes the measurement window, the load pattern, and the fields being compared before anything changes. Capture a baseline of completed checkpoints, the effective job configuration rather than code defaults, the state backend and whether incremental checkpointing is on, and the checkpoint storage's observed write behaviour; then apply one change and re-read the same fields. Because end-to-end duration is determined by the last subtask to acknowledge, as the checkpoint monitoring documentation states, two runs taken under different load say nothing about the change you made.

Source note. Apache Flink references in this article point to the stable documentation branch and to the Flink engineering blog; access date 2 December 2026.

Related Articles