Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

PulseBeamDev/pulsebeam

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,510 Commits
1,510 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation | Issues | Discord

PulseBeam

PulseBeam Logo: Open Source WebRTC SFU for browsers, mobile, and IoT

PulseBeam is an open source, general-purpose WebRTC SFU server for connecting browsers, mobile, and IoT clients. We believe real-time application development shouldn't be complicated, nor should it rely on heavy architectures with many moving parts. PulseBeam reduces this friction by adhering to these core design goals:

  • Support all WebRTC clients.
  • Keep the architecture simple, but not simpler.
  • Natively support vertical and horizontal scaling.
  • Provide client SDKs strictly for convenience, not necessity.
  • Require minimal configuration.

If your client device speaks WebRTC, it can communicate with PulseBeam.

Technical Targets

  • CPU induced p99 jitter: <2ms

Compatibility

PulseBeam is opinionated about media handling to prioritize battery efficiency, hardware support, and predictable performance:

  • Video: H.264 Baseline profile up to Level 4.1
  • Audio: Opus
  • Data Channel: Planned

Architecture

This is a thread-per-core system that isolates the data plane from the control plane. It follows a shared-nothing design, keeping the fast path lock-free and cache-local.

architecture

Quickstart

The following quickstart assumes that you have a Linux machine. As a fallback, you can go to https://pulsebeam.dev/#quickstart and check the "fallback" toggle.

Step 1. Run the PulseBeam Server

Docker/Podman (recommended):

docker run --rm --net=host ghcr.io/pulsebeamdev/pulsebeam:pulsebeam-v0.4.5 --dev

Open Port Requirements:

  • TCP/7070: HTTP signaling
  • TCP/6060: Internal CPU & Memory profilers
  • UDP/3478: WebRTC traffic (Multiplexed)
  • TCP/3478: WebRTC over TCP fallback (Multiplexed)

Note: The --dev flag used above configures PulseBeam to use port 3478 to avoid requiring root privileges. In production (running without --dev), WebRTC traffic defaults to standard port 443 (UDP/TCP).

Other options:

  • Binary: download from Releases
  • Source: cargo run --release -p pulsebeam

Step 2. Publish a video

Run the following snippet in the browser console:

const pc = new RTCPeerConnection();
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
const transceiver = pc.addTransceiver("video", {
  direction: "sendonly",
  // Define scalability layers (low, medium, high)
  sendEncodings: [
    { rid: "q", scaleResolutionDownBy: 4, maxBitrate: 150_000 },
    { rid: "h", scaleResolutionDownBy: 2, maxBitrate: 400_000 },
    { rid: "f", scaleResolutionDownBy: 1, maxBitrate: 1_250_000 },
  ],
});
transceiver.sender.replaceTrack(stream.getVideoTracks()[0]);

const offer = await pc.createOffer();
await pc.setLocalDescription(offer);

const res = await fetch("http://localhost:7070/api/v1/rooms/demo/participants", {
  method: "POST",
  headers: { "Content-Type": "application/sdp" },
  body: offer.sdp,
});

await pc.setRemoteDescription({ type: "answer", sdp: await res.text() });

Step 3. View the video stream

Go to https://codepen.io/lherman-cs/pen/pvgVZar, then put "demo" as the room to connect to.

Profiling & Metrics

PulseBeam exposes an internal debug HTTP server on http://localhost:6060.

  • Metrics (Prometheus): http://localhost:6060/metrics
  • CPU profile (pprof): http://localhost:6060/debug/pprof/profile?seconds=30
  • CPU flamegraph: http://localhost:6060/debug/pprof/profile?seconds=30&flamegraph=true
  • Memory profile: http://localhost:6060/debug/pprof/allocs

CPU profiling measures CPU usage, not wall time. For meaningful results, profile while the server is under load.

View CPU profiles with:

go tool pprof -http=:8080 cpu.pprof

Or view as a flamegraph on a browser by specifying flamegraph=true to the URL query.

Roadmap

You can view the full roadmap here.

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.