Deployable Cloudflare Worker Signaling Relay
Lightweight Cloudflare Worker script for real-time room signaling, hand-raise queue, and WebRTC peer connection relay under Cloudflare's Free Tier.
Free Tier Deployment Guide
- Durable Objects Room Coordination: Guarantees all broadcaster and viewer WebSockets connect to the exact same room instance across different browsers, machines, and networks (avoids edge isolate splitting). Included on Cloudflare Free Tier.
- Dynamic WHEP Distribution: Viewers no longer need the WHEP URL or credentials in their invite link. The Worker dynamically requests the endpoint from the active broadcaster upon code verification.
- Stateless Admission & Kick: Broadcasters receive real-time knock notifications to admit or decline viewers (or enable Auto-Approve), and can kick attendees at any moment.
- Heartbeat & Keepalive: Automatic 15s ping/pong keepalive ensures long-running broadcast sessions never drop unexpectedly on edge proxies.
-
Deploy Worker:
Run
npx wrangler deploywith the providedworker.jsandwrangler.toml.
Cloudflare Free Tier Allowances
Workers Requests:100,000 / day
External Storage Cost:$0 (Local Files)
WebRTC Protocol:IETF WHIP / WHEP