Skip to content

Phase 2: Stream responses to client via StreamingBody #567

@aram356

Description

@aram356

Parent: #563
Depends on: #566 (Phase 1)

Goal

Wire up Fastly's StreamingBody API so processed chunks flow directly to the client instead of being buffered.

Tasks

Acceptance Criteria

  • Streaming activates when Next.js is disabled and backend returns 2xx
  • Client receives first body bytes after first processed chunk
  • Peak memory per request constant (chunk buffer + parser state)
  • No regressions on static, auction, or discovery endpoints
  • Buffered fallback works correctly when post-processors are registered
  • StreamingBody abort-on-drop for mid-stream errors

Rollback

Revert Tasks 6-8 commits → buffered behavior restored. Phase 1 improvements kept.

Plan

See docs/superpowers/plans/2026-03-25-streaming-response.md (Tasks 6-10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions