Skip to content

docs(streaming): add One Connection, Many Topics guide#198

Merged
Mlaz-code merged 1 commit into
mainfrom
docs/single-connection-streaming
May 2, 2026
Merged

docs(streaming): add One Connection, Many Topics guide#198
Mlaz-code merged 1 commit into
mainfrom
docs/single-connection-streaming

Conversation

@Mlaz-code
Copy link
Copy Markdown
Collaborator

Summary

New page at /en/streaming/single-connection covering how to cover multiple sports, leagues, books, markets, events, and odds + every opportunity type on a single SSE or WebSocket connection — instead of opening parallel sockets per filter. Wires it into the streaming sidebar between websocket and the rest.

Frames the guidance against the new 1-stream-per-key default cap (newer-wins displacement on second connect) and directs fleet/multi-process users to the per-key maxStreams Unkey override for Enterprise.

What's covered

  • Filter syntax table (sport, league, sportsbook, market, event, SSE channel, WS channels) showing comma-joined values.
  • Five concrete patterns: multi-sport via comma-joined leagues, channel=all for odds + opportunities, N-event tracking via comma-joined event IDs, per-book/market splits, dynamic re-subscription on WebSocket.
  • Fleet & multi-process section explaining the legitimate need for parallel sockets and the maxStreams escape hatch.
  • Server-side cost rationale (per-cycle diff + pre-serialize once + per-client filter), so wide subscriptions are cheap.
  • Migration checklist for users moving off a multi-stream architecture.

Origin

Page was drafted in a parked tdev session that lived on the 8-day-old docs/remove-game-state-from-opportunities branch (already merged via #195, so the branch had no commits left to ship). Reviewed clean: Nextra <Callout> / <Tabs> usage matches the rest of streaming/, all cross-links resolve (/en/streaming/overview, /en/streaming/websocket#reconnection, /en/api-reference/stream, /en/api-reference/websocket).

Test plan

  • Vercel preview build succeeds — confirms MDX parses and Nextra components render
  • Sidebar shows new "One Connection, Many Topics" entry under Streaming, after WebSocket
  • All five anchor cross-links from the new page resolve in the preview
  • Code samples render with copy buttons (Nextra default)

🤖 Generated with Claude Code

New page at /en/streaming/single-connection covering how to cover
multiple sports, leagues, books, markets, events, and odds + every
opportunity type on a single SSE or WebSocket connection — instead of
opening parallel sockets per filter.

Frames the guidance against the new 1-stream-per-key cap (newer-wins
displacement on second connect) and points fleet/multi-process users to
the per-key `maxStreams` Unkey override for Enterprise.

Five concrete patterns: multi-sport via comma-joined leagues,
`channel=all` for odds + opportunities, N-event tracking via
comma-joined event IDs, per-book/market splits, dynamic re-subscription
on WebSocket. Ends with a server-side cost rationale and migration
checklist for users moving off a multi-stream architecture.

Page was drafted in a parked tdev session (8-day-old branch
docs/remove-game-state-from-opportunities, already merged via #195) and
reviewed clean — cross-links resolve, Nextra components match the rest
of the streaming/ section.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.sharpapi.io Ready Ready Preview, Comment May 2, 2026 3:02pm

Request Review

@Mlaz-code Mlaz-code merged commit 49a8392 into main May 2, 2026
2 checks passed
@Mlaz-code Mlaz-code deleted the docs/single-connection-streaming branch May 2, 2026 15:05
Mlaz-code added a commit that referenced this pull request May 7, 2026
New page at /en/streaming/single-connection covering how to cover
multiple sports, leagues, books, markets, events, and odds + every
opportunity type on a single SSE or WebSocket connection — instead of
opening parallel sockets per filter.

Frames the guidance against the new 1-stream-per-key cap (newer-wins
displacement on second connect) and points fleet/multi-process users to
the per-key `maxStreams` Unkey override for Enterprise.

Five concrete patterns: multi-sport via comma-joined leagues,
`channel=all` for odds + opportunities, N-event tracking via
comma-joined event IDs, per-book/market splits, dynamic re-subscription
on WebSocket. Ends with a server-side cost rationale and migration
checklist for users moving off a multi-stream architecture.

Page was drafted in a parked tdev session (8-day-old branch
docs/remove-game-state-from-opportunities, already merged via #195) and
reviewed clean — cross-links resolve, Nextra components match the rest
of the streaming/ section.
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