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).
More on Firewalls, MAC & Compliance
How do ufw, firewalld, nftables and iptables relate?BeginnerConfigure ufw for a web server with SSH only from the office.BeginnerExplain firewalld zones and runtime vs permanent configuration.IntermediateWrite a minimal nftables ruleset for a server.AdvancedHow do you avoid locking yourself out when changing remote firewall rules?IntermediateHost firewall vs cloud security groups: do you need both?Intermediate