Skip to content

perf(zero-cache): negotiate cumulative stream acks - #10

Closed
Karavil wants to merge 1 commit into
capy/rm-vs-load-v6-websocket-batchesfrom
capy/rm-vs-load-cumulative-ack-negotiation
Closed

perf(zero-cache): negotiate cumulative stream acks#10
Karavil wants to merge 1 commit into
capy/rm-vs-load-v6-websocket-batchesfrom
capy/rm-vs-load-cumulative-ack-negotiation

Conversation

@Karavil

@Karavil Karavil commented May 26, 2026

Copy link
Copy Markdown
Owner

what changed

Adds negotiated cumulative ACKs for the stream transport. New clients request cumulative ACKs, but only enable them after the server sends the capability frame. Old v6 servers therefore keep receiving per-message ACKs.

benchmark output

medium-wide-batch-pressure, 15s, compared to v6 websocket batch frames:

tx/s: 2,099.4 -> 2,781.5
rows/s: 41,987.6 -> 55,629.2
fanout msg/s: 68,585.4 -> 88,968.3
websocket ACKs: 1,046,498 -> 731
process CPU utilization: 1.780 -> 1.583
reconnect catchup to join: 275.1 ms -> 216.7 ms

validation

pnpm exec vitest --project='*no-pg*' run src/types/streams.test.ts bench/rm-vs-load/config.test.ts bench/rm-vs-load/scenarios.test.ts bench/rm-vs-load/workloads.test.ts
pnpm exec vitest --project='*15*' run src/services/change-streamer/change-streamer-http.pg.test.ts
pnpm run check-types

Why: reduce websocket ACK churn while keeping new clients compatible with old v6 stream servers during rollout.

* advertise cumulative ACK capability before enabling cumulative sender semantics

* make new clients fall back to per-message ACKs without the capability frame

* add benchmark ACK mode controls for cumulative websocket runs
@Karavil
Karavil force-pushed the capy/rm-vs-load-v6-websocket-batches branch from 4a4431c to 9ca34bf Compare May 26, 2026 19:02
@Karavil
Karavil force-pushed the capy/rm-vs-load-cumulative-ack-negotiation branch from 053ba29 to 2dd5827 Compare May 26, 2026 19:02
@Karavil

Karavil commented May 26, 2026

Copy link
Copy Markdown
Owner Author

Replaced by rocicorp/mono PRs rocicorp#6070 through rocicorp#6078.

@Karavil Karavil closed this May 26, 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.

1 participant