Add opt-in streaming queue-status protocol for smart clients #70

Open
opened 2026-09-12 19:54:49 +00:00 by nsaspy · 0 comments
Owner

Goal

Give queue-aware clients a way to hold a request open and receive queue/status heartbeats without compromising the transparent proxy path.

Why this is separate

A transparent HTTP proxy cannot emit SSE response-body bytes while a request is queued and then later preserve the upstream status line and headers: sending the SSE response commits the downstream HTTP response first.

Scope

  • Define an explicit opt-in queue-aware protocol/header or endpoint.
  • For opted-in streaming clients, emit queue/heartbeat events while waiting.
  • On admission, bridge the upstream streaming response into the already-established downstream stream.
  • Define how upstream non-2xx responses are represented after the downstream stream is committed.
  • Preserve the normal transparent path for clients that do not opt in; those clients receive bounded waiting or 429 + Retry-After from #70.
  • Integrate Agent Zero in #72 once this contract exists if the streaming path is useful.

Tests

  • heartbeat while queued;
  • admission transition;
  • cancellation while queued;
  • queue timeout/full error event;
  • upstream non-2xx mapping;
  • no interference with transparent HTTP behavior.
## Goal Give queue-aware clients a way to hold a request open and receive queue/status heartbeats without compromising the transparent proxy path. ## Why this is separate A transparent HTTP proxy cannot emit SSE response-body bytes while a request is queued and then later preserve the upstream status line and headers: sending the SSE response commits the downstream HTTP response first. ## Scope - Define an explicit opt-in queue-aware protocol/header or endpoint. - For opted-in streaming clients, emit queue/heartbeat events while waiting. - On admission, bridge the upstream streaming response into the already-established downstream stream. - Define how upstream non-2xx responses are represented after the downstream stream is committed. - Preserve the normal transparent path for clients that do not opt in; those clients receive bounded waiting or `429 + Retry-After` from #70. - Integrate Agent Zero in #72 once this contract exists if the streaming path is useful. ## Tests - heartbeat while queued; - admission transition; - cancellation while queued; - queue timeout/full error event; - upstream non-2xx mapping; - no interference with transparent HTTP behavior.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/llm-log#70
No description provided.