/plushcap/analysis/cloudflare/sockmap-tcp-splicing-of-the-future

SOCKMAP - TCP splicing of the future

What's this blog post about?

The article discusses TCP socket splicing API, a promising technology that can potentially revolutionize data-heavy applications like software proxies. It explains how proper TCP socket splicing reduces the load on userspace processes and enables more efficient data forwarding. The author also delves into the history of L7 proxies and their birthing pains, highlighting the limitations of existing methods such as sendfile(2), splice(2), and vmsplice. The article then introduces SOCKMAP, a new eBPF machinery for socket splicing introduced in Linux Kernel 4.14. It explains how to use SOCKMAP and its benefits, including the fact that data is never copied to userspace, there's no need to wake up the userspace program, and all the action is done in the kernel. However, despite these theoretical advantages, the author found that SOCKMAP was not ready for prime time yet due to poor performance, high jitter, and a couple of bugs. The article concludes by expressing excitement about the potential of eBPF interfaces and their ability to offload TCP splicing to the kernel.

Company
Cloudflare

Date published
Feb. 18, 2019

Author(s)
Marek Majkowski

Word count
2259

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.