# Merbridge - Accelerate your mesh with eBPF

DevFeed: [Merbridge - Accelerate your mesh with eBPF](<https://devfeed.tech/articles/merbridge-accelerate-your-mesh-with-ebpf-48757.md>)

Original publisher: [Read original article](<https://istio.io/latest/blog/2022/merbridge/>)

Author: Kebe Liu (DaoCloud), Xiaopeng Han (DaoCloud), Hui Li (DaoCloud)

Published: 2022-03-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Istio](<https://devfeed.tech/sources/istio-blog.md>)

Topics: [eBPF](<https://devfeed.tech/topics/ebpf.md>), [istio](<https://devfeed.tech/topics/istio.md>), [Network](<https://devfeed.tech/topics/network.md>), [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>)

Tags: [ebpf](<https://devfeed.tech/tags/ebpf.md>), [envoy-proxy](<https://devfeed.tech/tags/envoy-proxy.md>), [interception](<https://devfeed.tech/tags/interception.md>), [iptables](<https://devfeed.tech/tags/iptables.md>), [istio](<https://devfeed.tech/tags/istio.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [mesh](<https://devfeed.tech/tags/mesh.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [network](<https://devfeed.tech/tags/network.md>), [observability](<https://devfeed.tech/tags/observability.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [services](<https://devfeed.tech/tags/services.md>), [sidecar](<https://devfeed.tech/tags/sidecar.md>)

## AI overview

This tutorial explains how Merbridge uses eBPF to replace iptables-based traffic interception in an Istio service mesh. By forwarding packets directly between inbound and outbound sockets, it shortens the datapath and aims to improve network performance. The article also describes the relevant kernel requirements and deployment command.

## Source excerpt

The secret of Istio's abilities in traffic management, security, observability and policy is all in the Envoy proxy. Istio uses Envoy as the "sidecar" to intercept service traffic, with the kernel's netfilter packet filter functionality configured by iptables. There are shortcomings in using iptables to perform this interception. Since netfilter is a highly versatile tool for filtering packets, several routing rules and data filtering processes are applied before reaching the destination socket. For example, from the network layer to the transport layer, netfilter will be used for processing for several times with the rules predefined, like pre_routing, post_routing and etc. When the packet becomes a TCP packet or UDP packet, and is forwarded to user space, some additional steps like packet validation, protocol policy processing and destination socket searching will be performed. When a sidecar is configured to intercept traffic, the original data path can become very long, since duplicated steps are performed several times. Over the past two years, eBPF has become a trending technology, and many projects based on eBPF have been released to the community. Tools like Cilium and Pixie show great use cases for eBPF in observability and network packet processing. With eBPF's sockops and redir capabilities, data packets can be processed efficiently by directly being transported from an inbound socket to an outbound socket. In an Istio mesh, it is possible to use eBPF to replace iptables rules, and accelerate the data plane by shortening the data path. We have created an open source project called Merbridge, and by applying the following command to your Istio-managed cluster, you can use eBPF to achieve such network acceleration. $ kubectl apply -f https://raw.githubusercontent.com/merbridge/merbridge/main/deploy/all-in-one.yaml Attention: Merbridge uses eBPF functions which require a Linux kernel version >= 5.7. With Merbridge, the packet datapath can be shortened directl