Skip to content

Match the hook to the job

Step 9 of 9Recap
DDOS / L4
XDP
CAPTURE / CNI
TC / tcx
SERVICE LB
cgroup/sock
DPDK UPF
out of scope
  • ingress frame
  • egress / socket
  • XDP drop / redirect
XDP, TC & Socket Hooks, step 9 of 9

Every step higher in the Linux network stack trades raw packets-per-second for richer metadata and symmetry. Pick the lowest hook that still sees the context you need.

Use XDP for ingress filtering and DDoS defense, TC for bidirectional pod capture and policy, and socket hooks for identity-aware service routing.

Networking hook comparison

XDP TC (cls_bpf) Socket / cgroup
Direction Ingress only Ingress + egress App send/recv
sk_buff ready No (raw DMA) Yes Full socket
Pod identity IP only veth / mark Exact cgroup
Best use Drop / redirect CNI & capture Mesh / NAT bypass

Type to search…

↑↓ navigate↵ selectEsc close