Persistent transport
Keep Ethereum RPC misses on one authenticated WebSocket
The local accelerator answers warm calls from memory. When it needs canonical data, it multiplexes requests over a persistent Pro WebSocket instead of creating a new TLS connection for every call.
Why WebSocket transport helps
- Connection and authentication setup are amortized across messages.
- Many logical calls can travel through one Worker upgrade request.
- Request IDs are remapped so concurrent responses return to the correct caller.
- Reconnect and fallback behavior can be measured directly.
Private miss batches
Cache misses are coalesced briefly, assigned random wire IDs, shuffled, and padded to a fixed batch size before being sent. This reduces direct correlation between one application action and one upstream request.
Padding is traffic-analysis resistance, not private information retrieval. The Relay Worker can inspect misses, and the selected upstream sees the randomized batch.
Local-first request flow
Application → http://127.0.0.1:8545 ├─ warm key → local memory → response └─ miss → persistent authenticated WebSocket → Relay Worker → upstream
Capacity and quotas
WebSocket messages do not count as separate Cloudflare Worker requests after the initial upgrade, although Worker subrequests and platform CPU limits still apply. RPC Relay rotates connections conservatively before accumulated subrequest budgets can terminate a message unexpectedly.
Test the transport
rpc-relay-pro setup rpc-relay-pro doctor rpc-relay-pro benchmark