Interview Prep/Linux/Firewalls, MAC & Compliance

Why are nftables preferred over iptables at scale?

AdvancedProductionFirewalls, MAC & Compliance
Answer

nftables updates rulesets atomically (no window with half-applied rules), handles IPv4/IPv6 in one inet table, and has native sets and maps with O(1) lookups, so blocking 100k IPs is one rule with a set instead of 100k linear rules. iptables evaluates rules linearly and rewrites whole tables on each change, which became a bottleneck for kube-proxy with thousands of Services (hence kube-proxy's nftables and IPVS modes).

All Linux questions Roadmap: Linux

More on Firewalls, MAC & Compliance