Tech Stacks
    Overview
    System Design Patterns
    CAP Theorem
    C10K and C10M
    Network Programming Models
    Infrastructure as Code
    Examples

Tech Stacks - C10K and C10M Problem

Updated: 2022-02-05

C10K

C10K = Concurrently handle 10,000 connections.

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

https://en.wikipedia.org/wiki/C10k_problem

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.

C10M

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

https://mrotaru.wordpress.com/2015/05/20/how-migratorydata-solved-the-c10m-problem-10-million-concurrent-connections-on-a-single-commodity-server/

https://mrotaru.wordpress.com/2013/10/10/scaling-to-12-million-concurrent-connections-how-migratorydata-did-it/

  • 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)