Edge Notes
Scratchpad for protocol and edge-computing notes.
Lightweight transport
Proxy protocols over a commodity CDN are mostly an exercise in framing. The interesting part is not the tunnel itself but how much of the handshake you can compress without breaking middlebox heuristics.
Observations
- Latency to the edge dominates. Anycast geography matters more than raw bandwidth.
- TLS handshake reuse is the cheapest optimization available to a client.
- WebSocket framing adds a few bytes per write; batching at the client matters.
Implementation notes
Header layout: version | uuid[16] | optLen | opt | cmd | port[2] | atyp | addr.
Command 1 is a stream, command 3 is datagram with a two-byte length prefix.