Skip to content

Comments

Improved flow control for stream snapshots#7828

Merged
neilalexander merged 1 commit intomainfrom
neil/snapshotflowcontrol
Feb 13, 2026
Merged

Improved flow control for stream snapshots#7828
neilalexander merged 1 commit intomainfrom
neil/snapshotflowcontrol

Conversation

@neilalexander
Copy link
Member

This PR improves the flow control for stream snapshots:

  1. We will now keep a window of slots for in-flight chunks, rather than counting totals and potentially dropping acks, but still targeting 8MB in flight at any time
  2. We will now wait for a chunk to be filled (or EOF from the snapshotting goroutine) before sending it rather than opportunistically sending smaller chunks, providing more stable throughput on the wire
  3. Increase the amount of time that we can wait for acks from 2 seconds to 5 seconds, to better cope with slow connections
  4. Give up early in ack reply subscription handlers if we detect that the process has failed

Signed-off-by: Neil Twigg neil@nats.io

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander requested a review from a team as a code owner February 13, 2026 17:24
Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

@neilalexander neilalexander merged commit 7c38a31 into main Feb 13, 2026
69 of 70 checks passed
@neilalexander neilalexander deleted the neil/snapshotflowcontrol branch February 13, 2026 17:53
neilalexander added a commit that referenced this pull request Feb 16, 2026
Includes the following:

- #7780
- #7784
- #7782
- #7783
- #7787
- #7789
- #7793
- #7797
- #7798
- #7799
- #7790
- #7805
- #7810
- #7811
- #7812
- #7809
- #7724
- #7815
- #7816
- #7818
- #7819
- #7820
- #7795
- #7825
- #7828
- #7835
- #7837

Signed-off-by: Neil Twigg <neil@nats.io>
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