Interview Prep/Networking/Performance, MTU, Latency & Tools

Tune a Linux server to handle 100,000 concurrent connections.

AdvancedScenarioPerformance, MTU, Latency & Tools
Answer

Situation read → Think file descriptors, kernel buffers and the accept queue.

What I'd do →

  1. Raise limits: ulimit -n 1048576 and fs.file-max
  2. Tune the accept queue: net.core.somaxconn=65535 and net.ipv4.tcp_max_syn_backlog=65535
  3. Widen ports and enable tcp_syncookies
  4. Set net.core.netdev_max_backlog, use multi-queue NICs and RSS/RPS for CPU spread
  5. Use epoll-based servers (Nginx, Envoy)
  6. Verify with wrk or k6 while watching ss -s

Why → Each connection costs memory and a descriptor; the defaults assume far lower scale.

Interview tip → Say you measure after every change, not guess.

All Networking questions Roadmap: Networking for DevOps

More on Performance, MTU, Latency & Tools