Beyond OS Sockets: Custom Socket Interfaces in Envoy
summary
Envoy exposes a pluggable SocketInterface that lets bootstrap extensions replace kernel sockets end to end: a resolver binds an address to a socket backend, IOHandle methods (socket, bind, listen, accept, connect, read/write) map to either the kernel or a custom implementation. Two proven backends are Envoy 1.36 reverse tunnels where a reverse connection IO handle creates outbound TCPs, signals workers with a pipe and fakes accept, and VPP/VCL which runs full packet processing in user space while preserving filters and codecs. Integration trades (e.g., eBPF visibility loss) are discussed.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 0:42Socket interface in Envoy
- 3:35Listeners create sockets
- 5:18Selecting socket interfaces
- 6:44Registering custom sockets
- 7:27Use cases for sockets
- 9:13Reverse tunnels deep dive
- 12:23VPP and user-space networking
- 13:29Summary








