The 10G eBPF Edge: Bypassing Legacy iptables with Cilium DSR

Field notes on eliminating conntrack and encapsulation bottlenecks on 10GbE nodes using eBPF host-routing and Direct Server Return.

The 10G eBPF Edge: Bypassing Legacy iptables with Cilium DSR

The Legacy Packet Tax

At 1GbE line rates, Linux iptables rule chains and VXLAN overlay encapsulation hide comfortably behind spare CPU cycles. Push sustained 10GbE east-west and north-south flows across bare-metal Linux nodes, however, and softirq contention surfaces immediately.

Moving packet forwarding and service load-balancing straight into the Linux kernel via eBPF eliminates linear rule traversal and keeps return traffic off intermediate hops.

Enabling Native Routing & Direct Server Return

In a standard SNAT service hop, ingress nodes rewrite both source and destination addresses, forcing asymmetric return payloads to Hairpin back through the initial entry node. With Direct Server Return (DSR) over native routing, the backend pod answers the client IP directly.

routingMode: native
ipv4NativeRoutingCIDR: 10.42.0.0/16
kubeProxyReplacement: true
loadBalancer:
  mode: dsr
  dsrDispatch: opt
  acceleration: native
bpf:
  masquerade: true
  hostLegacyRouting: false

Verifying the Dataplane Path

Always confirm that kube-proxy iptables chains are absent and eBPF host routing is active inside the Cilium agent status output:

cilium status --verbose | grep -E "KubeProxyReplacement|Routing|Masquerading"
bpftool net show

Observed Latency & SoftIRQ Gains

Metric Legacy iptables + VXLAN eBPF Native + DSR
P99 Service Hop Latency 1.42 ms 0.31 ms
Ingress Node Return Bandwidth 100% Hairpinned Bypassed (Direct)
Peak ksoftirqd CPU Share 38% 9%

Operational Caveats

DSR with IPv4 option dispatch requires intermediate L3 Top-of-Rack switches and upstream OPNsense interfaces not to drop packets carrying custom IP options. When traversing strict transit VLANs where IP options are scrubbed, Geneve DSR dispatch provides a clean fallback while retaining return-path bypass.

Pseudonymous Peer Review

Field Log Discussion

Public @handle only · Private email hidden · Fenced code blocks supported

0 notes

Join the architecture review under a self-chosen @handle. Your email address is never displayed publicly.

Loading discussion notes...

Open Full ↗
Expanded view
Pseudonymous Identity
Reader Console