Skip to content

fix: honor node streaming backpressure#8557

Draft
Varixo wants to merge 1 commit intobuild/v2from
v2-fix-node-streaming
Draft

fix: honor node streaming backpressure#8557
Varixo wants to merge 1 commit intobuild/v2from
v2-fix-node-streaming

Conversation

@Varixo
Copy link
Copy Markdown
Member

@Varixo Varixo commented Apr 14, 2026

This PR makes Qwik SSR honor downstream backpressure during Node streaming. The core renderer now waits for pending async flushes before emitting the next chunk, and the Node middleware translates ServerResponse.write() / drain semantics into an awaitable stream signal instead of fire-and-forget writes.

It also adds a regression test in render-api.spec.tsx to ensure a second chunk is not emitted while the first async write is still pending, plus Node middleware regression coverage so handled errors are not rethrown after headers were already sent.

@Varixo Varixo self-assigned this Apr 14, 2026
@Varixo Varixo added the V2 label Apr 14, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 14, 2026

🦋 Changeset detected

Latest commit: 7b2f0b4

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@maiieul maiieul moved this from Backlog to In progress in Qwik Development Apr 14, 2026
@Varixo Varixo force-pushed the v2-fix-node-streaming branch from e868a54 to 7b2f0b4 Compare April 14, 2026 19:41
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 14, 2026

Open in StackBlitz

@qwik.dev/core

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8557

@qwik.dev/router

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8557

eslint-plugin-qwik

npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8557

create-qwik

npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8557

@qwik.dev/optimizer

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/optimizer@8557

commit: 7b2f0b4

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 7b2f0b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants