C10k Problem
   HOME

TheInfoList



OR:

The C10k problem is the problem of optimizing
network socket A network socket is a software structure within a network node of a computer network that serves as an endpoint for sending and receiving data across the network. The structure and properties of a socket are defined by an application programming ...
s to handle a large number of clients at the same time. The name C10k is a
numeronym A numeronym is a word, usually an abbreviation, composed partially or wholly of numerals. The term can be used to describe several different number-based constructs, but it most commonly refers to a contraction in which all letters between the fir ...
for concurrently handling ten thousand connections. Handling many concurrent connections is a different problem from handling many requests per second: the latter requires high throughput (processing them quickly), while the former does not have to be fast, but requires efficient scheduling of connections. The problem of socket server optimisation has been studied because a number of factors must be considered to allow a web server to support many clients. This can involve a combination of
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
constraints and web server software limitations. According to the scope of services to be made available and the capabilities of the operating system as well as hardware considerations such as multi-processing capabilities, a multi-threading model or a single threading model can be preferred. Concurrently with this aspect, which involves considerations regarding memory management (usually operating system related), strategies implied relate to the very diverse aspects of I/O management.


History

The term ''C10k'' was coined in 1999 by software engineer Dan Kegel, citing the Simtel FTP host, cdrom.com, serving 10,000 clients at once over 1
gigabit per second In telecommunications, data transfer rate is the average number of bits (bitrate), characters or symbols ( baudrate), or data blocks per unit time passing through a communication link in a data-transmission system. Common data rate units are mult ...
Ethernet Ethernet ( ) is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 198 ...
in that year. The term has since been used for the general issue of large number of clients, with similar numeronyms for larger number of connections, most recently "C10M" in the 2010s to refer to 10 million concurrent connections. By the early 2010s millions of connections on a single commodity 1U rackmount server became possible: over 2 million connections (
WhatsApp WhatsApp (officially WhatsApp Messenger) is an American social media, instant messaging (IM), and voice-over-IP (VoIP) service owned by technology conglomerate Meta. It allows users to send text, voice messages and video messages, make vo ...
, 24 cores, using Erlang on
FreeBSD FreeBSD is a free-software Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable ...
) and 10–12 million connections (MigratoryData, 12 cores, using
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
on
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
). Common applications of very high numbers of connections include general public servers that have to serve thousands or even millions of users at a time, such as
file server In computing, a file server (or fileserver) is a computer attached to a network that provides a location for shared disk access, i.e. storage of computer files (such as text, image, sound, video) that can be accessed by workstations within a co ...
s, FTP servers, proxy servers,
web server A web server is computer software and underlying Computer hardware, hardware that accepts requests via Hypertext Transfer Protocol, HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, co ...
s, and load balancers.


See also

*
Asynchronous I/O In computer science, asynchronous I/O (also non-sequential I/O) is a form of input/output processing that permits other processing to continue before the I/O operation has finished. A name used for asynchronous I/O in the Windows API is '' over ...
*
Event-driven architecture Event-driven architecture (EDA) is a software architecture paradigm concerning the production and detection of Event (computing), events. Event-driven architectures are Continuous design, evolutionary in nature and provide a high degree of fault to ...
*
Event-driven programming In computer programming, event-driven programming is a programming paradigm in which the Control flow, flow of the program is determined by external Event (computing), events. User interface, UI events from computer mouse, mice, computer keyboard, ...
*
Reactor pattern The reactor software design pattern is an event handling strategy that can respond to many potential service requests concurrently. The pattern's key component is an event loop, running in a ''single'' thread or process, which demultiplexes inc ...


References

{{Reflist, 2, refs= {{cite book , author= Andrew Alexeev , section-url= http://www.aosabook.org/en/nginx.html , section= §14. nginx; §14.1. Why Is High Concurrency Important? , editor1= Amy Brown , editor2= Greg Wilson , url= http://aosabook.org/en/index.html#aosa2 , title= The Architecture of Open Source Applications, Volume II: Structure, Scale and a Few More Fearless Hacks , publisher= Lulu.com , publication-date= 2012 , isbn= 9781105571817 , quote= Around ten years ago, Daniel Kegel, a prominent software engineer, … Kegel's C10K manifest … solving the C10K problem of 10,000 simultaneous connections,
nginx (pronounced "engine x" , stylized as NGINX or nginx) is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Russian developer Igor Sysoev and publicly released in 20 ...
{{ Cite web , url = http://www.kegel.com/c10k.html , title = The C10K problem , access-date = 18 June 2019 , first = Dan , last = Kegel , date = 8 May 1999 , website = Kegel com , quote = And computers are big, too. You can buy a 500MHz machine with 1 gigabyte of RAM and six 100Mbit/sec Ethernet card for $3000 or so. Let's see - at 10000 clients, that's 50KHz, 100Kbytes, and 60Kbits/sec per client. It shouldn't take any more horsepower than that to take four kilobytes from the disk and send them to the network once a second for each of ten thousand clients. (That works out to $0.30 per client, by the way. Those $100/client licensing fees some operating systems charge are starting to look a little heavy!) So hardware is no longer the bottleneck. , archive-url = https://web.archive.org/web/19990508164301/http://www.kegel.com/c10k.html , archive-date = 8 May 1999 , df = dmy-all Web server software Computer performance