System Design - C10K and C10M Problem

Last Updated: 2023-02-17


C10K = Concurrently handle 10,000 connections.

Note: C10k refers to connections, not the same as QPS.


The C10k problem is the problem of optimizing network sockets to handle a large number of clients at the same time.

Originally, Nginx was developed to solve the C10k problem.


C10K eas coined in 1999. By early 2010s the problem was "scaled up" to C10M, where M = millions.



  • Myth: TCP port ranges from 0 to 65535(for one IP). To support 10m connections: multiple servers, each server multiple IP address, each IP 65536 ports
  • Truth: can use a single port to accept any number of clients. Each connection has a socket descriptor. Use ulimit to assign a large number(>10M)