Skip to content

packages/relay: add an experimental Node relay runtime#417

Open
yanbw wants to merge 2 commits intogetpaseo:mainfrom
yanbw:experimental-node-relay
Open

packages/relay: add an experimental Node relay runtime#417
yanbw wants to merge 2 commits intogetpaseo:mainfrom
yanbw:experimental-node-relay

Conversation

@yanbw
Copy link
Copy Markdown

@yanbw yanbw commented Apr 15, 2026

Summary

  • add an experimental Node.js relay runtime for @getpaseo/relay/node
  • keep Node relay behavior aligned with the existing Cloudflare relay for both v1 and v2
  • add self-hosting docs plus Node-specific unit and E2E coverage

Test Plan

  • npm run typecheck --workspace=@getpaseo/relay
  • npm run build --workspace=@getpaseo/relay
  • cd packages/relay && npx vitest run src/node-adapter.test.ts src/node-adapter.e2e.test.ts src/cloudflare-adapter.test.ts

Notes

  • during local verification, src/e2e.test.ts showed intermittent wrangler dev startup timeouts before later passing again on rerun without code changes
  • the Cloudflare runtime behavior itself is unchanged in this patch

@cnaron
Copy link
Copy Markdown

cnaron commented Apr 20, 2026

Real-world data point in support of this direction. I'm self-hosting via the community project zenghongtu/paseo-relay on the same Seoul VPS that runs my Paseo daemon. From a mainland-China phone:

Metric relay.paseo.sh (CF) Self-hosted Δ
Ping avg (20 pkts) 195ms 107ms -88ms (-45%)
Packet loss 3–5% 0%
TLS handshake avg 540ms 363ms -177ms
WS single-frame RTT 225ms 155ms -70ms

Root cause for the CN delta: my ISP routes relay.paseo.sh (CF anycast) to AMS — so the default path crosses Europe. The VPS has a CN-direct route, and collapsing relay + daemon onto the same box removes the bad hop entirely.

For users running Paseo on their own VPS — likely a big slice of the "remote CC" audience — first-party self-host support is a clear win. Happy to test @getpaseo/relay/node builds when they land.

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.

2 participants