Skip to main content
Backpressure prevents unbounded growth of staged rows in the cloud and gives devices a signal to stop sending when the server cannot keep up.

Two pause mechanisms

Schema review and volume backpressure both set lineage paused in Postgres, but only volume/CB paths send MQTT downlink controls.

Volume thresholds (defaults)

Per lineage, configured in edge replication policy: When staged count or bytes exceed the max:
  1. Insert edge_pending_controls row (pause_lineage).
  2. Set lineage paused.
  3. Publish integration.edge_ingest_control.requested.v1 → broker delivers sync/ingest/control.
  4. Device ACKs, stops publishing that source_table, buffers durably.
When both metrics fall below 80% of caps, sweepBackpressureResume:
  1. Sets lineage active.
  2. Sends resume_lineage downlink with server_watermark.

Device protocol

On pause_lineage

On resume_lineage

If local buffer exceeded retention during pause, request bootstrap snapshot via secondary flow (when implemented) before resuming incremental sync. Downlink control

Lineage-scoped pause

Pause affects one SQLite table on one device. Other tables on the same device continue syncing. Example: device_state paused for backpressure; order_events still publishes.

Materialization circuit breaker

Separate from volume caps:
  • After 5 permanent materialization errors, lineage pauses and device receives pause_lineage.
  • Operator inspects materialization error on lineage detail.
  • Fix binding/DDL/TSDB issue.
  • Call POST .../lineages/{id}/reset-materialization to clear counter and optionally trigger resume_lineage.
platform-tui: lineage detail → x when materialization error section is present.
TUI x reset applies to materialization circuit breaker, not volume backpressure. For volume pause, wait for auto-resume sweep or reduce staged backlog operationally.

Monitoring

Operator responses