This talk was recorded at NDC TechTown in Kongsberg, Norway. #ndctechtown #ndcconferences #developer #softwaredeveloper
Attend the next NDC conference near you:
https://ndcconferences.com
https://ndctechtown.com/
Subscribe to our YouTube channel and learn every day:
/ @NDC
Follow our Social Media!
https://www.facebook.com/ndcconferences
https://twitter.com/NDC_Conferences
https://www.instagram.com/ndc_conferences/
#clanguage #technique #os
Network proxies have one thing in common. They push data from one side to the other. If the proxy doesn’t touch the data, then it is desirable to offload the job of moving data from one network socket to another to the operating system.
Under Linux, applications can pipe data in batches between sockets with the `splice()` syscall. However this is not the only way to splice two sockets together!
Linux also offers another way to push packets between two TCP sockets without exiting to user-space, called sockmap. The mechanism is powered by the built-in logic built in the core network stack and a couple of BPF-based components to drive the operation.
In this talk we will go over everything a user needs to know to get started using BPF sockmap. We will also discuss sockmap features, internal design, as well as its caveats and limitations.