Katran is an open-source layer 4 network load balancer (L4LB) developed by Meta. L4LBs are load balancers that operate on packets, not application level requests, Meta explained. 

According to Meta, typically, L4LBs are important in managing latency and scaling the number of backend servers in an environment. 

The company says that the key benefits of Katran include it being “blazing fast,” having linear performance scaling, and its RSS friendly encapsulation. 

The project was created and used internally at Meta before the company decided to open-source it in 2018. When developing it, the company had a few requirements in mind: it must run on Linux servers, coexist with other services on a server, allow low-disruption maintenance, and offer easy instrumentation and debugging. 

Katran went through two iterations to become the project it is now. The second version takes advantage of two key kernel innovations: eXpress Data Path (XDP) and eBPF virtual machine. XDP provides a programmable network data path that works well with Linux, and the eBPF virtual machine provides a flexible and efficient way to interact with the Linux kernel.

“We believe that Katran offers an excellent forwarding plane to users and organizations who intend to leverage the exciting combination of XDP and eBPF to build efficient load balancers,” Facebook Engineering wrote in a blog post when it open sourced the project.