Skip to content

docs: document optional HA clustering - #11

Merged
AlexanderWagnerDev merged 1 commit into
mainfrom
cursor/document-ha-clustering
Aug 10, 2026
Merged

docs: document optional HA clustering#11
AlexanderWagnerDev merged 1 commit into
mainfrom
cursor/document-ha-clustering

Conversation

@AlexanderWagnerDev

@AlexanderWagnerDev AlexanderWagnerDev commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document optional multi-node HA clustering (server/panel 0.2.0) across homepage, docs, download, and comparison pages
  • Add task guide for bootstrap, join, ports 1940/1941, API/panel ops, and alpha limits
  • Update sitemap and cross-links so operators can find cluster setup from Docker/self-host paths

Test plan

  • Open /guides/rtmp-server-ha-clustering/ and confirm layout/TOC on desktop and mobile
  • Check /docs/#cluster anchors, feature tables, and port list (1940/1941)
  • Verify homepage feature card, path checklist, and guides index card link correctly
  • Confirm sitemap.xml includes the new guide URL

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features
    • Added comprehensive documentation for optional HA RTMP clustering, including OpenRaft replication, media mesh behavior, node bootstrapping, joining, APIs, panel controls, and required ports.
    • Added a dedicated HA RTMP clustering guide.
    • Updated Docker and source-build guidance to explain clustering setup and configuration.
    • Updated homepage, project descriptions, comparisons, and guides to highlight cluster-aware capabilities.
  • Documentation
    • Added the HA clustering guide to site navigation and sitemap.
    • Documented current alpha limitations and clustering availability.

Server/panel 0.2.0 cluster mode was missing from the site.

Co-authored-by: Cursor <cursoragent@cursor.com>
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The site now documents optional HA clustering across the server, panel, Docker deployment, native builds, comparison content, and a new dedicated guide. Navigation and sitemap entries now expose the clustering guide and updated release information.

Changes

HA clustering documentation

Layer / File(s) Summary
HA clustering guide
guides/rtmp-server-ha-clustering/index.php
Added clustering metadata, capabilities, ports, bootstrap and join procedures, APIs, panel operations, limitations, and navigation.
Deployment and build documentation
docs/index.php, download/index.php, guides/self-hosted-rtmp-server-docker/index.php
Documented cluster builds, runtime settings, networking, storage, ports, versions, and Docker deployment requirements.
Product and comparison messaging
README.md, index.php, guides/openrtmp-vs-nginx-rtmp/index.php
Updated project descriptions, homepage content, architecture descriptions, use cases, and comparison criteria for optional HA clustering.
Guide navigation and sitemap
guides/index.php, sitemap.xml
Added the HA guide card and sitemap entry. Updated sitemap modification dates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the pull request's main change: documenting optional HA clustering.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/document-ha-clustering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
guides/openrtmp-vs-nginx-rtmp/index.php (1)

28-28: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Align the comparison metadata with the new summary.

The visible summary now includes optional HA clustering, but $pageDescription at Line 4 remains unchanged. structuredData.description uses $pageDescription at Line 11, so the page metadata and JSON-LD omit the new comparison topic. Update $pageDescription to include optional HA clustering.

Proposed metadata update
-$pageDescription = 'Compare OpenRTMP and nginx-rtmp by architecture, deployment, APIs, stream keys, statistics, codec goals, and missing features.';
+$pageDescription = 'Compare OpenRTMP and nginx-rtmp by architecture, deployment, APIs, stream keys, statistics, codec goals, optional HA clustering, and missing features.';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@guides/openrtmp-vs-nginx-rtmp/index.php` at line 28, Update the
$pageDescription metadata to mention optional HA clustering, keeping it aligned
with the visible Summary callout so the page metadata and
structuredData.description include this comparison topic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/index.php`:
- Around line 301-302: Update docs/index.php lines 301-302 to identify ports
1940 and 1941 as peer-only HA networking that operators must explicitly map when
clustering is enabled, rather than ports exposed by default. Update
guides/self-hosted-rtmp-server-docker/index.php line 53 to replace the
unconditional “The stack exposes” wording with conditional guidance for
clustered deployments.

In `@guides/rtmp-server-ha-clustering/index.php`:
- Around line 77-78: Update the cluster-node promotion example to use HTTPS or a
secure tunnel instead of plaintext HTTP, and explicitly state in the surrounding
guide that the bearer token must never be transmitted over unencrypted HTTP.

---

Nitpick comments:
In `@guides/openrtmp-vs-nginx-rtmp/index.php`:
- Line 28: Update the $pageDescription metadata to mention optional HA
clustering, keeping it aligned with the visible Summary callout so the page
metadata and structuredData.description include this comparison topic.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4cc5abbe-56c9-452c-868e-ba51ea8f9b2f

📥 Commits

Reviewing files that changed from the base of the PR and between 5d612cf and dffee1d.

📒 Files selected for processing (9)
  • README.md
  • docs/index.php
  • download/index.php
  • guides/index.php
  • guides/openrtmp-vs-nginx-rtmp/index.php
  • guides/rtmp-server-ha-clustering/index.php
  • guides/self-hosted-rtmp-server-docker/index.php
  • index.php
  • sitemap.xml

Comment thread docs/index.php
Comment on lines +301 to +302
<tr><td><code>1940</code></td><td>Cluster control plane (<code>CLUSTER_BIND</code>) &mdash; only when <code>CLUSTER_ENABLED=true</code></td></tr>
<tr><td><code>1941</code></td><td>Cluster media mesh (<code>CLUSTER_MEDIA_BIND</code>) &mdash; only when clustering is enabled</td></tr>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Correct the default Docker port description.

The default deployment is standalone and does not map cluster ports. Present 1940 and 1941 as explicit peer-only HA networking that operators add when clustering is enabled.

  • docs/index.php#L301-L302: move these ports out of the “Ports exposed by default” list, or change the table heading and state that operators must explicitly map them for clustered nodes.
  • guides/self-hosted-rtmp-server-docker/index.php#L53-L53: replace “The stack exposes” behavior with conditional HA network guidance.
📍 Affects 2 files
  • docs/index.php#L301-L302 (this comment)
  • guides/self-hosted-rtmp-server-docker/index.php#L53-L53
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/index.php` around lines 301 - 302, Update docs/index.php lines 301-302
to identify ports 1940 and 1941 as peer-only HA networking that operators must
explicitly map when clustering is enabled, rather than ports exposed by default.
Update guides/self-hosted-rtmp-server-docker/index.php line 53 to replace the
unconditional “The stack exposes” wording with conditional guidance for
clustered deployments.

Comment on lines +77 to +78
<pre><code>curl -X POST http://10.0.0.1:8080/api/v1/cluster/nodes/2/promote \
-H "Authorization: Bearer &lt;api-token&gt;"</code></pre>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not send the API bearer token over plaintext HTTP.

Lines 77-78 send Authorization: Bearer <api-token> to http://10.0.0.1:8080. A network observer can capture and replay this token to modify cluster membership. Run this operation through HTTPS or a secure tunnel. State this requirement in the guide.

Proposed documentation change
- curl -X POST http://10.0.0.1:8080/api/v1/cluster/nodes/2/promote \
+ # Use the HTTPS API endpoint, or run this through a secure tunnel.
+ curl -X POST https://admin.example.internal/api/v1/cluster/nodes/2/promote \
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<pre><code>curl -X POST http://10.0.0.1:8080/api/v1/cluster/nodes/2/promote \
-H "Authorization: Bearer &lt;api-token&gt;"</code></pre>
<pre><code># Use the HTTPS API endpoint, or run this through a secure tunnel.
curl -X POST https://admin.example.internal/api/v1/cluster/nodes/2/promote \
-H "Authorization: Bearer &lt;api-token&gt;"</code></pre>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@guides/rtmp-server-ha-clustering/index.php` around lines 77 - 78, Update the
cluster-node promotion example to use HTTPS or a secure tunnel instead of
plaintext HTTP, and explicitly state in the surrounding guide that the bearer
token must never be transmitted over unencrypted HTTP.

@AlexanderWagnerDev
AlexanderWagnerDev merged commit ece46df into main Aug 10, 2026
6 of 7 checks passed
@AlexanderWagnerDev
AlexanderWagnerDev deleted the cursor/document-ha-clustering branch August 10, 2026 10:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dffee1ddc8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +76 to +78
<p>Joined nodes start as learners. After catch-up, promote to voter:</p>
<pre><code>curl -X POST http://10.0.0.1:8080/api/v1/cluster/nodes/2/promote \
-H "Authorization: Bearer &lt;api-token&gt;"</code></pre>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Require three voters before calling the topology HA

If an operator follows the walkthrough with the single joiner shown, promoting node 2 creates a two-voter Raft group, whose majority remains two; losing either node therefore removes quorum rather than providing failover. The guide should require an odd, three-voter topology for HA or explicitly state that the demonstrated two-node setup cannot tolerate a voter failure.

Useful? React with 👍 / 👎.

Comment on lines +71 to +75
<pre><code>CLUSTER_ENABLED=true
CLUSTER_NODE_ID=2
CLUSTER_JOIN=10.0.0.1:1940
CLUSTER_SECRET=&lt;same-secret&gt;
LRTMP2_DB=/data/node2.db</code></pre>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Advertise the joining node's peer addresses

For the documented multi-host setup, this joiner configuration supplies only the address of node 1 and never sets node 2's CLUSTER_ADVERTISE_ADDR or CLUSTER_MEDIA_ADVERTISE_ADDR. Other peers consequently have no peer-dialable control or media address for node 2 unless undeclared settings are supplied out of band, so the copy-and-paste join procedure cannot establish the bidirectional Raft/media topology described above. Add node 2's advertised addresses to this snippet.

Useful? React with 👍 / 👎.


<h2 id="limits">Current limitations</h2>
<ul class="check-list">
<li>After owner failure, publishers must reconnect to a public RTMP endpoint; automatic publisher migration is not implied.</li>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Provide a failover endpoint for RTMP clients

When operators follow the node-specific IP and port examples in this guide, a publisher configured for the failed owner's address cannot reach another node merely by reconnecting, and players connected to any failed node also lose their sockets. Raft and the media mesh do not provide client ingress failover, so the HA procedure needs a health-checked load balancer or failover DNS endpoint and should state that both publishers and players must reconnect through it.

Useful? React with 👍 / 👎.

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