Skip to content

Add a telescoping SUBSCRIBE_DEMAND to moq-lite and a moq-transport extension#31

Draft
kixelated wants to merge 1 commit into
mainfrom
claude/serene-golick-e3445c
Draft

Add a telescoping SUBSCRIBE_DEMAND to moq-lite and a moq-transport extension#31
kixelated wants to merge 1 commit into
mainfrom
claude/serene-golick-e3445c

Conversation

@kixelated

@kixelated kixelated commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reports the downstream demand for a subscription back up the relay fan-out tree, in two places:

  1. moq-lite (draft-lcurley-moq-lite.md) — a new SUBSCRIBE_DEMAND message on the Subscribe Stream.
  2. A new moq-transport extension (draft-lcurley-moq-demand.md) — the same functionality as a standalone extension I-D against draft-ietf-moq-transport.

A relay aggregates many downstream subscriptions for a Track into one upstream subscription, so an origin can't see its true audience or what those subscribers need. SUBSCRIBE_DEMAND fixes that with values chosen to aggregate cheaply up the tree.

What it carries

  • Audience sizeSubscriptions Created and Subscriptions Closed, cumulative counts whose difference is the current subscriber count. A relay reports the sum of each across its downstreams, so demand telescopes for free: the origin reads its total audience across any number of hops from one upstream subscription. Reporting two counts (rather than one gauge) also lets a publisher distinguish churn from a new arrival — a rising Created is an implicit new-group signal.
  • Group Request — the minimum group the subscriber wants produced (encoded like Group Start; 0 = no request). Unlike a PLI-style "new group now" trigger, this is a level: already satisfied if a group at or beyond it exists. That makes it idempotent and lets it aggregate as the maximum of downstream requests (less any a relay can serve from cache), so duplicate requests never produce duplicate groups. This is the deduplication win over draft-ietf-moq-transport-18, which gives 0 the special meaning "generate now".

moq-lite change

  • New SUBSCRIBE_DEMAND message (Subscriptions Created, Subscriptions Closed, Group Request).
  • Introduces a Type tag on the subscriber's post-SUBSCRIBE messages (0x0 SUBSCRIBE_UPDATE, 0x1 SUBSCRIBE_DEMAND), mirroring the publisher's already-typed responses.
  • Relays SHOULD rate-limit demand updates to absorb churn; a Group Request increase is latency-sensitive and forwarded promptly.
  • Changelog entry under moq-lite-05.

moq-transport extension (new draft)

  • Fire-and-forget SUBSCRIBE_DEMAND control message on the subscription's request stream: consumes no Request ID and elicits no response (a poor fit for REQUEST_UPDATE, whose job is to modify the subscription).
  • Negotiated per hop via a SUBSCRIBE_DEMAND Setup Option (0xC0117).
  • Real Security/Privacy Considerations: per-hop opt-out for sensitive audience sizes; values are subscriber-supplied and untrusted (MUST NOT drive billing/admission/rate-limiting without verification); churn amplification bounded by the rate-limit and by the idempotent group request.
  • IANA registrations for the Setup Option and the control message type.

Notes for reviewers

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kixelated, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 minute and 51 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cec6525d-b8bf-4c9b-a5a0-95c56ed5419d

📥 Commits

Reviewing files that changed from the base of the PR and between 80308a3 and b40032c.

📒 Files selected for processing (2)
  • draft-lcurley-moq-lite.md
  • draft-lcurley-moq-subscribe-stats.md
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/serene-golick-e3445c

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kixelated kixelated marked this pull request as draft June 11, 2026 18:34
…tension

Report the downstream demand for a subscription back up the relay
fan-out tree, so an origin learns its true audience and what those
subscribers need across any number of hops.

moq-lite: a new SUBSCRIBE_DEMAND message on the Subscribe Stream
carrying Subscriptions Created and Subscriptions Closed (cumulative
counts whose difference is the current subscriber count; a relay sums
each across its downstreams, so demand telescopes for free) and a
Group Request (the minimum group the subscriber wants produced,
encoded like Group Start). The group request is a level, not a
one-shot "new group now" trigger -- already satisfied if a group at
or beyond it exists -- so it is idempotent and aggregates as the
maximum of downstream requests; a publisher MAY also treat a rising
Subscriptions Created as an implicit new-group request. A Type tag is
added to the subscriber's post-SUBSCRIBE messages (0x0
SUBSCRIBE_UPDATE, 0x1 SUBSCRIBE_DEMAND).

moq-transport: draft-lcurley-moq-demand expresses the same in
moq-transport's idiom -- a fire-and-forget SUBSCRIBE_DEMAND control
message on the request stream (no Request ID, no response),
negotiated per hop via a SUBSCRIBE_DEMAND Setup Option. Replaces the
earlier subscribe-stats framing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kixelated kixelated force-pushed the claude/serene-golick-e3445c branch from b40032c to 16b0aa7 Compare June 19, 2026 03:27
@kixelated kixelated changed the title Add telescoping Subscriber Count to moq-lite and a moq-transport extension Add a telescoping SUBSCRIBE_DEMAND to moq-lite and a moq-transport extension Jun 19, 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