Skip to content

Add routing peer sizing guide#815

Open
SunsetDrifter wants to merge 7 commits into
mainfrom
docs/routing-peer-sizing-guide
Open

Add routing peer sizing guide#815
SunsetDrifter wants to merge 7 commits into
mainfrom
docs/routing-peer-sizing-guide

Conversation

@SunsetDrifter

@SunsetDrifter SunsetDrifter commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new Sizing Routing Peers page under Manage → Networks (/manage/networks/sizing-routing-peers), giving admins a method to choose the size and number of routing peers from measured throughput.

What the page covers

  • A four-step sizing method — estimate peak throughput, read a per-peer capacity, compute how many active peers, then split load across Networks — threaded through one running example (Acme, 6,000 remote users).
  • The download/upload (encrypt/decrypt) distinction that actually drives sizing, since the encrypt path runs roughly twice as fast as decrypt.
  • A per-peer capacity reference table (1 → 64 vCPU) measured on AWS c6in.16xlarge (Intel Xeon Platinum 8375C), with the methodology and a small-packet caveat stated.
  • A userspace-mode table showing wireguard-go does not scale across cores, plus the cases where a routing peer ends up on userspace: missing/broken/conflicting kernel module, no TUN device (netstack, including rootless Docker), non-Linux peers, and forcing userspace to capture policy IDs and blocked traffic events.
  • Tuning levers (kernel WireGuard, matched interface, jumbo frames, cores up to the knee) and how to scale out across multiple Networks.
  • An honest high-availability model — failover (different metrics) vs. nearest-peer selection (equal metrics), and why neither balances a Network's load, so load is split deterministically by building more Networks.

Wiring

  • Adds the page to the docs navigation, under Networks.
  • Cross-links from How Routing Peers Work (a note in the HA section + a related tile) and the Networks overview.

Summary by CodeRabbit

  • New Features

    • Added a new documentation page for sizing routing peers, with guidance on throughput-based planning, capacity references, tuning tips, and scaling recommendations.
    • Added new navigation and related links so the page is easier to find from existing networking docs.
  • Documentation

    • Clarified routing peer behavior in high-availability setups and updated baseline sizing guidance to point readers to the new sizing guide.

Add a Sizing Routing Peers page under Networks covering the four-step
sizing method, a per-peer capacity table, the tuning levers that matter,
and how to scale out by sharding load across identical Networks.

Cross-link it from How Routing Peers Work (HA note + related tile) and
the Networks overview, and add it to the docs navigation.
Generalize the Acme example to remote users, correct the encrypt/decrypt
framing and reach the local network rather than the datacenter, use
'routing peer' instead of 'gateway', and rename the recap to Summary.
Correct the high-availability description: a single Network does not
balance load across its peers — different metrics give failover (one
peer carries all), equal metrics give latency-based nearest-peer
selection, which splits traffic by geography but never evenly. Shard
into more Networks to split load deterministically.

Also collapse redundant restatements, drop the secondary worked
example (the capacity table covers it), and slim the commodity-hardware
guidance.
Extend the capacity table down to 1 and 2 vCPUs, drop the 'or more' from
the interface column, and adjust the methodology note so the interface
column reads uniformly as the minimum NIC to pair with each size.
Add a userspace-mode capacity table showing wireguard-go does not scale
across cores (download plateaus ~6.8 Gbps, only ~4-5 cores used), and
the cases where a routing peer runs userspace: missing/broken/conflicting
kernel module, no TUN device (netstack, incl. rootless Docker), non-Linux
peers, and forcing userspace to capture policy IDs and blocked traffic
events. Name the exact benchmark CPU (Xeon Platinum 8375C).
Rename the Scaling out heading and reword the body, description, and
recap to talk about splitting load across more Networks instead of
sharding. Update the in-page anchor link to match the new heading.
Lead each direction bullet with Download:/Upload: and say the routing
peer encrypts/decrypts, tying the pulling/pushing distinction to the
capacity table's column names.
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 04988487-333c-4481-86e3-15620969a3d3

📥 Commits

Reviewing files that changed from the base of the PR and between ffb72cf and e17669d.

📒 Files selected for processing (4)
  • src/components/NavigationDocs.jsx
  • src/pages/manage/networks/how-routing-peers-work.mdx
  • src/pages/manage/networks/index.mdx
  • src/pages/manage/networks/sizing-routing-peers.mdx

📝 Walkthrough

Walkthrough

This PR adds a new documentation page, sizing-routing-peers.mdx, describing a method for sizing NetBird routing peers based on measured throughput, and wires it into navigation and cross-links from the existing index.mdx and how-routing-peers-work.mdx pages.

Changes

Sizing Routing Peers Docs

Layer / File(s) Summary
Navigation and cross-linking
src/components/NavigationDocs.jsx, src/pages/manage/networks/index.mdx, src/pages/manage/networks/how-routing-peers-work.mdx
Adds a “Sizing Routing Peers” sidebar link and cross-links it from the Networks index and how-routing-peers-work pages, including a Failure Domains note and a Related tile.
Page framing and sizing method
src/pages/manage/networks/sizing-routing-peers.mdx
Introduces the new MDX page with metadata, title, and a four-step method to size routing peers with a worked example.
Capacity reference tables and tuning guidance
src/pages/manage/networks/sizing-routing-peers.mdx
Adds kernel and userspace WireGuard capacity tables, tuning tips, HA/scaling-out notes, and cloud/virtualization considerations.
Measurement procedure and summary
src/pages/manage/networks/sizing-routing-peers.mdx
Adds an iperf3-based measurement procedure, a bullet summary, and a Related tiles component.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • netbirdio/docs#773: Both PRs add a new Networks-related link entry to the exported docsNavigation in src/components/NavigationDocs.jsx.
  • netbirdio/docs#779: Both PRs modify the same Networks documentation files, including NavigationDocs.jsx, index.mdx, and how-routing-peers-work.mdx.
  • netbirdio/docs#786: Both PRs update the docsNavigation structure in NavigationDocs.jsx.

Suggested reviewers: lixmal, TechHutTV

Poem

A rabbit hops through cores and lanes,
Counting peers and download gains,
Sharding peaks across each Network wide,
With iperf3 as our trusty guide,
Docs now sized just right, no throughput pains! 🐇📈

🚥 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 summarizes the main change: adding a guide for routing peer sizing.
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 docs/routing-peer-sizing-guide

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/components/NavigationDocs.jsx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

src/pages/manage/networks/how-routing-peers-work.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

src/pages/manage/networks/index.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

  • 1 others

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.

@SunsetDrifter SunsetDrifter marked this pull request as ready for review July 3, 2026 16:01
@SunsetDrifter SunsetDrifter requested review from lixmal and mlsmaycon July 3, 2026 16:01
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