Skip to content

docs + fix: realtime media infrastructure (Path A) and SFU config corrections#21

Merged
billyribeiro-ux merged 3 commits into
mainfrom
claude/update-dependencies-stack-docs-nffxp
Jun 6, 2026
Merged

docs + fix: realtime media infrastructure (Path A) and SFU config corrections#21
billyribeiro-ux merged 3 commits into
mainfrom
claude/update-dependencies-stack-docs-nffxp

Conversation

@billyribeiro-ux

Copy link
Copy Markdown
Owner

Summary

Adds the self-hosted realtime media-infrastructure guide (Path A — Hetzner SFU + coturn) and fixes two latency-critical mismatches in the SFU/compose configuration.

Docs

  • docs/MEDIA_INFRASTRUCTURE.md (new) — complete guide for self-hosting the live screenshare + voice plane for true low-latency realtime: providers to sign up for, server specs (CCX dedicated vCPU), ports/firewall, latency budget, codec/transport tuning, sysctl + BBR, coturn specifics, DNS, multi-node scaling, and a pre-flight checklist with chrome://webrtc-internals validation.
  • SUBSCRIPTIONS_AND_TIERS.md — cross-links the media doc; corrected the SFU checklist line.

Realtime SFU config fix

Two mismatches would have forced TURN relay (extra latency) or broken direct WebRTC connectivity:

  1. Env-name mismatch — the SFU code reads MEDIASOUP_ANNOUNCED_IP / MEDIASOUP_RTC_MIN_PORT / MEDIASOUP_RTC_MAX_PORT, but the compose set ANNOUNCED_IP / RTC_MIN_PORT / RTC_MAX_PORT (silently ignored → no announced IP).
  2. Port range mismatch — published 10000–10100 vs worker default 10000–59999.

Applied:

  • infrastructure/docker/docker-compose.ymlMEDIASOUP_* names, range 40000–49999, network_mode: host for the lowest-latency media path (no Docker NAT), Redis via host-published port.
  • Corrected sfu/.env.example, .env.example, DEPLOYMENT_GUIDE.md to the same names/range.

Validated with docker compose config -q (exit 0).

https://claude.ai/code/session_01AMiTSxG8rB8FU8QgJ3Fnhs


Generated by Claude Code

claude added 3 commits June 6, 2026 14:15
…n catalog

- external service subscriptions needed end-to-end (Neon, Stripe, R2, TURN,
  hosting, Redis, domain/TLS + optional email/observability/CI) with required?,
  recommended tier, cost, and the exact env vars each maps to
- in-app tier catalog (Free/Starter/Professional/Business/Enterprise) with limits,
  Stripe product/price + webhook setup, and a ready-to-run plans seed SQL
- provisioning checklist + local dev shortcut
…etworking

The compose/SFU media config had two latency-critical mismatches: the SFU
code reads MEDIASOUP_ANNOUNCED_IP / MEDIASOUP_RTC_MIN_PORT / MEDIASOUP_RTC_MAX_PORT
but the compose set ANNOUNCED_IP / RTC_MIN_PORT / RTC_MAX_PORT (silently ignored),
and the published port window (10000-10100) did not match the worker range. Either
would have forced TURN relay or broken direct WebRTC connectivity.

- docker-compose SFU service: rename to MEDIASOUP_* names, set range 40000-49999,
  switch to host networking for the lowest-latency media path (no Docker NAT),
  and reach Redis via its host-published port.
- Correct sfu/.env.example, .env.example, and DEPLOYMENT_GUIDE.md to the same names/range.
- Update docs/MEDIA_INFRASTRUCTURE.md and SUBSCRIPTIONS_AND_TIERS.md to reflect the applied fix.

https://claude.ai/code/session_01AMiTSxG8rB8FU8QgJ3Fnhs
@billyribeiro-ux billyribeiro-ux merged commit 3000a63 into main Jun 6, 2026
3 of 6 checks passed
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.

2 participants