Interview Prep/Linux/Logs, Limits & High-Traffic Tuning

What is conntrack and why can it drop packets on busy servers?

AdvancedProductionLogs, Limits & High-Traffic Tuning
Answer

netfilter's connection tracking keeps an entry per flow for stateful firewalling and NAT (Docker, Kubernetes, firewalld all use it). When the table is full, new connections are dropped and dmesg shows nf_conntrack: table full, dropping packet.

sysctl net.netfilter.nf_conntrack_count net.netfilter.nf_conntrack_max
sudo conntrack -S
sudo sysctl -w net.netfilter.nf_conntrack_max=1048576

Also consider reducing timeouts (nf_conntrack_tcp_timeout_established) or exempting high-volume traffic with notrack rules.

All Linux questions Roadmap: Linux

More on Logs, Limits & High-Traffic Tuning