Skip to content

Concurrent pipelines participate in backpressure#25334

Merged
nickvikeras merged 2 commits intomainfrom
nickv/dynamic-concurrency-control-3
Feb 7, 2026
Merged

Concurrent pipelines participate in backpressure#25334
nickvikeras merged 2 commits intomainfrom
nickv/dynamic-concurrency-control-3

Conversation

@nickvikeras
Copy link
Copy Markdown
Contributor

Description

Previously only sequential pipelines reported commit_hi back to the
ingestion regulator. Concurrent pipelines were effectively invisible to
the broadcaster.

When I was trying to implement adaptive concurrency control without this in place,
the broadcaster would keep spawning new ingestion tasks even when the pipelines had
hit write throughput limits and eventually the system would just oom.

Test plan

I have tested it during a testnet backfill as part of a larger effort to enable adaptive rate limiting.


Release notes

  • Indexing Framework: Enable ingestion backpressure for concurrent pipelines

@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env February 6, 2026 21:02 — with GitHub Actions Inactive
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sui-docs Ready Ready Preview, Comment Feb 7, 2026 6:03pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Preview Feb 7, 2026 6:03pm
sui-kiosk Ignored Ignored Preview Feb 7, 2026 6:03pm

Request Review

Copy link
Copy Markdown
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable -- originally the intention was that concurrent pipelines implement backpressure through fixed channel buffer sizes, so OOMs seem to indicate that the buffer sizes were too generous there, but it also seems like a nice thing to have a uniform way to handle back-pressure.

Note that I've left a suggestion to simplify the indexer set-up even further based on this change, PTAL.

This change will also need to be accompanied with a docs change, e.g. here https://docs.sui.io/guides/developer/accessing-data/pipeline-architecture#concurrent-backpressure

added_pipelines: BTreeSet::new(),
first_ingestion_checkpoint: u64::MAX,
next_sequential_checkpoint: None,
initial_commit_hi: None,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that all pipelines participate in this, is its value ever different from first_ingestion_checkpoint (with the exception of using u64::MAX instead of None in the empty case)?

@nickvikeras nickvikeras force-pushed the nickv/dynamic-concurrency-control-3 branch from d7ec589 to 91a007a Compare February 7, 2026 17:45
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env February 7, 2026 17:46 — with GitHub Actions Inactive
Base automatically changed from nickv/dynamic-concurrency-control-2 to main February 7, 2026 17:57
Previously, each spawned fetch task independently waited on ingest_hi
inside itself, meaning tasks were already spawned and consuming resources
while blocked on backpressure. Now checkpoints are gated at the stream
level via backpressured_checkpoint_stream(), so tasks are only spawned
when the backpressure window allows.
Previously only sequential pipelines reported commit_hi back to the
ingestion regulator. Concurrent pipelines were effectively invisible to
the broadcast. Now concurrent pipelinnes also send their watermark
progress via commit_hi_tx, allowing ingestion to slow down when any
pipeline falls behind.

Having backpressure allows us to avoid setting a hard upper bound on
ingestion concurrency and instead dynamically discover it using feedback
systems.
@nickvikeras nickvikeras force-pushed the nickv/dynamic-concurrency-control-3 branch from 91a007a to b40fa8f Compare February 7, 2026 18:00
@nickvikeras nickvikeras temporarily deployed to sui-typescript-aws-kms-test-env February 7, 2026 18:00 — with GitHub Actions Inactive
@nickvikeras nickvikeras enabled auto-merge (squash) February 7, 2026 18:19
@nickvikeras nickvikeras merged commit 4200be7 into main Feb 7, 2026
57 of 59 checks passed
@nickvikeras nickvikeras deleted the nickv/dynamic-concurrency-control-3 branch February 7, 2026 18:23
nickvikeras added a commit that referenced this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants