Repository navigation
librtmp2-server 0.7.0
Added
- Docker Hub images. Every release and channel build now also publishes
docker.io/openrtmp/librtmp2-servernext to GHCR and Quay, using the
org-levelDOCKERHUB_*secrets.README.dockerhub.mdis the paste-ready
repository description.
Security
- A cluster delete keeps its per-row random
delete_tokenthrough
SeedFromStandalone; a seed entry written before tokens existed derives
the same deterministic fallback on every replica. A stream seeded on a
fresh learner can be deleted through that node again, and log-replayed and
snapshot-restored nodes no longer diverge. - Cluster startup upgrades the shared SQLite connection to
synchronous=FULLbefore any Raft state is read or written, so a granted
vote or acknowledged log entry survives a power loss. An in-memory
database is rejected for durable Raft commits; standalone keepsNORMAL
for join latency. - A stream drain counts durable active session rows, and a disabled or
pending-delete stream refuses new publisher and player rows, so an
authorization that finishes after finalize cannot install a ghost role.
Ownership release takes the per-connection entry under one lock and only
for the stream being released, and delete markers are published under a
consistent sticky-then-deleted lock order.
Fixed
- A publish or play authorization that is still in flight no longer lets the
old tracked role deactivate the row it just installed; the old role is
released only after the pending authorization resolves, for publishers
and players alike. - A cluster delete whose forwarded write fails after dispatch is treated as
ambiguous and finalized in the background, while a connect, TLS or auth
failure that never reached the leader stays a definite 500. A failed
DELETE restores the stream's pre-request enabled state instead of always
enabling it. - The players list uses the checked viewer reader, so a viewer-table failure
returns the DB error envelope instead of200 []. - The sticky-marker lock is released before viewer lookups and the idle
sleep, so a poll pass cannot hold it across an unrelated viewer lookup.
Changed
- Package version
0.6.9→0.7.0. - The HA control plane is built on OpenRaft 0.10 through the v1 RPC and
snapshot adapter. Raft voters must still run the same build before relying
on the delete/ownership fences; seedocs/clustering.md. - Built on librtmp2 0.17.1.
- The Docker runtime image tracks the
alpine:3.24tag, which provides the
riscv64 variant, instead of pinning3.24.4. - The multi-arch Docker workflow accepts a
refinput so a release image
can be rebuilt from the exact tag. - Dependency updates: rusqlite 0.42 (bundled SQLite) and uuid 1.29.2.
- CI workflows pin third-party GitHub Actions to commit SHAs.
What's Changed
- docs: refresh quickstart screenshot for 0.6.9 by @AlexanderWagnerDev in #360
- fix(cluster): replicate delete tokens during standalone seed by @AlexanderWagnerDev in #361
- fix(http): reconcile a dispatched delete whose outcome is unknown by @AlexanderWagnerDev in #362
- fix(http,server): preserve publisher and stream state on failure paths by @AlexanderWagnerDev in #363
- chore(deps): update taiki-e/install-action digest to 3f7c359 by @renovate[bot] in #364
- fix(deps): update rust crate openraft to v0.9.26 by @renovate[bot] in #367
- chore(deps): update rust crate uuid to v1.29.2 by @renovate[bot] in #366
- fix(server): close delete/auth and ownership races by @AlexanderWagnerDev in #365
- fix(deps): update rust crate openraft to v0.10.0 by @renovate[bot] in #368
- fix(cluster): make Raft vote and log writes power-loss durable by @AlexanderWagnerDev in #369
- fix(deps): update rust crate rusqlite to 0.42 by @renovate[bot] in #370
- Release 0.7.0 by @AlexanderWagnerDev in #371
Full Changelog: v0.6.9...v0.7.0
Benchmarks
Measured automatically for this release on a CI runner; the machine is described below. Raw data: bench-results-v0.7.0.json.
- Measured: 2026-11-12 20:32:38 UTC ·
bc95990· crate version 0.7.0 · workflow run - Built on: librtmp2 0.17.1
- CPU: AMD EPYC 7763 64-Core Processor · 4 vCPUs
- RAM: 15.6 GiB
- System: Linux 7.0.0-1019-azure x86_64 · rustc 1.100.0 · GitHub-hosted ubuntu26 (image 20261101.186.1)
- Noise: shared CI VM — CPU model, neighbouring load and the runner image change between runs, so treat absolute numbers as indicative.
- Comparable vs release v0.6.9:
⚠️ same CPU model and vCPU count, but rustc changed: differences under 10 % may come from the toolchain or host, not the code
http_api
| Benchmark | Time | Throughput | vs release v0.6.9 |
|---|---|---|---|
http_api/create_stream |
281.99 µs | — | ⚪ +1.9 % |
http_api/health |
157.25 µs | — | ⚪ −5.4 % |
http_api/list_streams |
11.2 ms | — | ⚪ −2.4 % |
🟢 faster · 🔴 slower · ⚪ within the noise band (5–25 % depending on how comparable the two environments are, plus both runs' Criterion confidence intervals). Lower time is better.
Cross-server sweep
Same RTMP client and ffmpeg source for every server, one server at a time: load viewers 500 1000 2000, publisher ffmpeg 1280x720@30 H.264 2.5 Mbps + AAC 128 kbps. One sweep per run, no repetitions — the shared runner makes single values noisy, so compare servers within this run rather than across runs.
Servers: librtmp2-server 0.7.0 (librtmp2 0.17.1) · MediaMTX v1.21.3 · nginx-rtmp nginx 1.31.8 (nginx-rtmp-module @ 6c7719d)
librtmp2-server vs the baselines
| Metric | Now | vs release v0.6.9 |
|---|---|---|
| publish handshakes/s | 6,362 | ⚪ −0.3 % |
| publish handshake avg (ms) | 3.68 | ⚪ +1.9 % |
| publish handshake p95 (ms) | 7.75 | ⚪ −9.5 % |
| play handshakes/s | 6,386 | 🟢 +11.8 % |
| play handshake avg (ms) | 3.57 | ⚪ +5.6 % |
| play handshake p95 (ms) | 6.03 | 🟢 −10.8 % |
| join, 1 viewer: avg (ms) | 0.58 | ⚪ +5.5 % |
| join, 1 viewer: p95 (ms) | 0.58 | ⚪ +5.5 % |
| join, 25 viewers: avg (ms) | 1.87 | 🟢 −31.8 % |
| join, 25 viewers: p95 (ms) | 3.86 | ⚪ +6.3 % |
| join, 100 viewers: avg (ms) | 5.90 | ⚪ +8.5 % |
| join, 100 viewers: p95 (ms) | 12.85 | 🔴 +20.7 % |
| load, 500 viewers: join avg (ms) | 37.66 | 🔴 +75.2 % |
| load, 500 viewers: join p95 (ms) | 72.25 | 🔴 +50.5 % |
| load, 500 viewers: frames/viewer | 73.67 | ⚪ −0.0 % |
| load, 500 viewers: CPU (% of one core) | 36.70 | ⚪ +2.8 % |
| load, 500 viewers: peak RSS (MiB) | 23.90 | ⚪ +3.0 % |
| load, 1000 viewers: join avg (ms) | 31.92 | 🟢 −29.4 % |
| load, 1000 viewers: join p95 (ms) | 92.06 | 🟢 −25.5 % |
| load, 1000 viewers: frames/viewer | 73.64 | ⚪ +0.0 % |
| load, 1000 viewers: CPU (% of one core) | 72.70 | ⚪ +3.1 % |
| load, 1000 viewers: peak RSS (MiB) | 34.00 | ⚪ +1.5 % |
| load, 2000 viewers: join avg (ms) | 115.7 | 🟢 −15.2 % |
| load, 2000 viewers: join p95 (ms) | 297.3 | ⚪ +0.8 % |
| load, 2000 viewers: frames/viewer | 73.64 | ⚪ −0.0 % |
| load, 2000 viewers: CPU (% of one core) | 129.4 | ⚪ −2.7 % |
| load, 2000 viewers: peak RSS (MiB) | 53.90 | ⚪ −0.7 % |
Handshake latency
| Server | publish /s | avg ms | p95 | p99 | play /s | avg ms | p95 | p99 |
|---|---|---|---|---|---|---|---|---|
| librtmp2-server | 6,362 | 3.68 | 7.75 | 8.53 | 6,386 | 3.57 | 6.03 | 7.35 |
| MediaMTX | 4,652 | 5.29 | 8.22 | 9.52 | 3,794 | 6.29 | 10.33 | 12.08 |
| nginx-rtmp | 689.0 | 42.20 | 43.71 | 43.87 | 356.5 | 83.19 | 84.76 | 84.97 |
Join latency (avg / p95 ms)
| Server | 1 viewer | 25 viewers | 100 viewers |
|---|---|---|---|
| librtmp2-server | 0.58 / 0.58 | 1.87 / 3.86 | 5.90 / 12.85 |
| MediaMTX | 0.87 / 0.87 | 2.41 / 4.36 | 9.86 / 14.42 |
| nginx-rtmp | 82.09 / 82.09 | 83.46 / 84.93 | 85.05 / 87.08 |
Many viewers on one stream
| Viewers | Server | join avg / p95 ms | CPU % (one core) | peak RSS MiB | frames/viewer |
|---|---|---|---|---|---|
| 500 | librtmp2-server | 37.66 / 72.25 | 36.70 | 23.90 | 73.67 |
| 500 | MediaMTX | 62.27 / 101.5 | 113.6 | 101.7 | 73.60 |
| 500 | nginx-rtmp | 112.6 / 141.9 | 56.00 | 21.50 | 73.60 |
| 1000 | librtmp2-server | 31.92 / 92.06 | 72.70 | 34.00 | 73.64 |
| 1000 | MediaMTX | 110.6 / 191.1 | 205.7 | 166.1 | 73.76 |
| 1000 | nginx-rtmp | 149.8 / 208.6 | 88.50 | 27.40 | 57.26 |
| 2000 | librtmp2-server | 115.7 / 297.3 | 129.4 | 53.90 | 73.64 |
| 2000 | MediaMTX | 540.7 / 1,438 | 201.5 | 311.7 | 36.84 |
A competitor delivering fewer frames per viewer than the others was overloaded at that step (the delivered rate, not just latency, is the result).