VOOZH about

URL: https://thenewstack.io/bytedance-to-network-a-million-containers-with-netkit/

⇱ Netkit to Network a Million Containers for ByteDance - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2025-01-29 06:00:16
Netkit to Network a Million Containers for ByteDance
Containers / eBPF / Linux / Networking

Netkit to Network a Million Containers for ByteDance

Built on eBPF, netkit offers a swifter alternative to Virtual Ethernet for container networking, ByteDance engineers have concluded.
Jan 29th, 2025 6:00am by Joab Jackson
👁 Featued image for: Netkit to Network a Million Containers for ByteDance
Background image via Unsplash. 

Engineers from the Chinese social media conglomerate ByteDance are taking early advantage of a recently released feature of the Linux kernel called netkit that provides a faster way for containers to communicate with each other across a cluster.

First released in Linux kernel 6.7 in December 2023, netkit is a kernel network device that can be programmed by eBPF  (not to be confused with the now-discontinued Netkit that was used to create virtual networks on a single server) and has been touted as a way to streamline container networking.

Like the rest of the cloud native world, ByteDance uses Virtual Ethernet (veth) to network containers. A network interface that has been in Linux since 2008, veth provides a way to create private networks of containers while still allowing them to communicate with the outside world.

Issues with veth

Though veth would seem like a perfect fit for container networking, but practitioners soon discovered it had a number bottlenecks that slowed communication rates across containers. In fact, veth requires each packet to traverse two network stacks — one of the sender and the other of the recipient — even if the two containers communicating were on the same server, which was often the case.

Virtual Ethernet requires packets to be routed up through the L2  Layer to find their destination addresses via the Address Resolution Protocol (ARP).

Because it is embedded in the kernel, netkit can intercept these packets before they hit the network stack and route them internally if the destination is on the same host. In other words, everything is sorted out in Layer 3, the network’s own layer, without pushing it up to Layer 2.

👁 performance chart comparing Netfkit vs Veth.

In its own tests, ByteDance found this improved performance by 10% once these “soft bottlenecks were removed,” according to a case study issued Monday by the eBPF Foundation. Plus, eliminating veth reduces CPU usage, the company found.

This was great news for such a performance-minded company.

ByteDance Investigates

Founded in 2012, ByteDance runs a number of large-scale platforms, all of which depend on fast performance.

There is the massively popular mobile short video service TikTok (nearly 2 billion users), along with its Chinese version Douyin (抖音), operated as an independent entity just for China. There’s also Toutiao (今日头条), a news and personal content aggregator app; and a long-form video platform, Xigua Video (西瓜视频): There’s also a gaming division, a hosted recommendation service (BytePlus Recommend), an enterprise collaboration suite (Lark) and the popular CapCut video editing tool and hosted service.

Moving to netkit would make sense. Isovalent, whose engineers worked closely on netkit, were the first to support the technology, with version 1.16 of its Cilium container networking platform. The problem for ByteDance was it only worked with those servers running Linux Kernel 6.7 or greater.

Due to “operational constraints,” ByteDance was still on Linux Kernel 5.15 and won’t make it to version 6.7 for another few years. So the company backported eBPF (along with the tcx traffic control extension), to this earlier kernel. It also needed to update the Container Network Interface (CNI) it was using.

Smooth Rollout

Now the company is in the process of updating its many kernels with eBPF, and updating CNI as well. Thus far netkit has been deployed in “dozens of clusters,” with minimal issues.

“We haven’t seen any accidents reported to netkit,”said ByteDance senior engineer Chen Tang, in a talk at the eBPF Summit last year. “I’m confident to say netkit is trustable.”

As with any production system, the trick with the upgrade is to not incur any downtime. So veth will also be kept in place for the time being.

New containers coming online would use netkit, while existing ones would continue use to veth. The engineers worked out how the two protocols could communicate and how veth, should netkit fail, would serve as a backup.

There is no need for additional setup for netkit. Once netkit is in the kernel, a netkit device can be created using netlink, an inter-process communication socket. ByteDance added this support in both the golang netlink package and iproute2.

There isn’t too much difference between setting up a veth and a netkit, but to achieve the best performance, the eBPF program should be attached to the container side of a netkit pair.

The company developed an agent to manage the eBPF program on the host for inner-server use, for tasks such as paring up layer ACL rules into bpf map entries, and dumping necessary information for kernel debugging. View the whole presentation here:

TRENDING STORIES
Joab Jackson is a senior editor for The New Stack, covering cloud native computing and system operations. He has reported on IT infrastructure and development for over 30 years, including stints at IDG and Government Computer News. Before that, he...
Read more from Joab Jackson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.