You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add transparent performance layer to web gateway for WireGuard/direct
proxy targets using a dedicated selfHandleResponse proxy instance:
- Gzip compression for text responses (HTML, CSS, JS, JSON, SVG)
reduces transfer by 74-77% (3MB bundle → 816KB)
- HTTP keep-alive agent reuses TCP connections to PC2 nodes,
cutting subsequent request latency from ~370ms to ~130ms
- Cache-Control headers for static assets when node doesn't set its own
- Boson ActiveProxy, WebSocket, and API routes unaffected
Updated architecture docs, agent handover, and supernode operator guide.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: docs/pc2-infrastructure/SUPERNODE_OPERATOR_GUIDE.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -478,6 +478,16 @@ The Web Gateway's `/api/wg/register` endpoint handles dynamic peer provisioning:
478
478
4. Node receives `{assignedIP, serverPublicKey, serverEndpoint}` and activates its tunnel
479
479
5. Gateway updates the username registry to point to `http://10.100.0.x:4200`
480
480
481
+
### Gateway Performance Layer
482
+
483
+
The Web Gateway includes a transparent performance layer for WireGuard/direct proxy targets:
484
+
485
+
-**Gzip compression**: Text responses (HTML, CSS, JS, JSON, SVG) are compressed on the fly, reducing transfer sizes by 74-77%. Binary content (images, video) passes through untouched.
486
+
-**HTTP keep-alive pooling**: TCP connections to PC2 nodes are reused instead of opening a new one per request, eliminating repeated TCP handshake latency (~240ms saved per subsequent request).
487
+
-**Cache headers**: Static assets (`.js`, `.css`, `.png`, `.woff2`, etc.) receive `Cache-Control` headers when the PC2 node doesn't set its own, enabling browser caching.
488
+
489
+
These optimizations are fully transparent -- the PC2 node receives identical requests and its response headers are preserved. Boson Active Proxy connections are unaffected (they require `Connection: close`).
490
+
481
491
### Capacity
482
492
483
493
Each supernode supports ~250 WireGuard peers (10.100.0.2 through 10.100.0.254). For larger deployments, multiple supernodes can each manage their own /24 subnet.
0 commit comments