C10k problem: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Rotarum (talk | contribs)
I added a reference to a conference paper discussing the C10M problem
No edit summary
Line 4: Line 4:


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 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 the I/O management.<ref name=Liu-Deters />
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 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 the I/O management.<ref name=Liu-Deters />

== C10M problem ==
"The '''C10M''' problem relates to the classic '''C10k''' [[Internet]] [[scalability]] problem, which originally occurred in the context of ({{em|title=editor's note|1=ftp and}}) web servers. The C10M problem, which consists in supporting 10 million concurrent connections on a single machine, remains a challenging problem not only for web servers, but for any [[Server (computing)|Internet server]] in general."
<ref name="C10M">{{Cite web|url=https://migratorydata.com/blog/migratorydata-solved-the-c10m-problem/|title=How MigratoryData solved the C10M problem: 10 Million Concurrent Connections on a Single Commodity Server|website=migratorydata.com|language=en|date=2015-05-20|access-date=2021-10-15|author=Mihai Rotaru}}</ref>
<ref name="C10M-howto">{{Cite web|url=https://migratorydata.com/blog/migratorydata-with-12-million-concurrent-websockets/|title=Scaling to 12 Million Concurrent Connections: How MigratoryData Did It|website=migratorydata.com|language=en|date=2013-10-10|access-date=2021-10-15|author=Mihai Rotaru}}</ref>
<ref name="C10M-middleware-2017">{{cite journal |last1=Rotaru |first1=Mihai |last2=Olariu |first2=Florentin |last3=Onica |first3=Emanuel |last4=Rivière |first4=Etienne |display-authors= |date=December 2017 |title=Reliable messaging to millions of users with MigratoryData |url=https://arxiv.org/pdf/1712.09876.pdf |journal=Proceedings of the 18th ACM/IFIP/USENIX Middleware Conference: Industrial Track |pages=1–7 |doi=10.1145/3154448.3154449}}</ref>


== History ==
== History ==
Line 20: Line 14:
<ref name="conn-very-high-file">{{Cite book|url=https://www.google.it/books/edition/High_Performance_Computing_HiPC_2008/cNwZ1snBYQYC?hl=it&gbpv=1&dq=file+server+very+high+number+of+connections&pg=PA470&printsec=frontcover|title=High Performance Computing - HiPC 2008|language=en|year=2008|access-date=2021-10-15|author1=Ponnuswamy Sadayappan|author2=Manish Parashar|author3=Ramamurthy Badrinath|author4=Viktor K. Prasanna|isbn=978-3-540-89893-1}}</ref>
<ref name="conn-very-high-file">{{Cite book|url=https://www.google.it/books/edition/High_Performance_Computing_HiPC_2008/cNwZ1snBYQYC?hl=it&gbpv=1&dq=file+server+very+high+number+of+connections&pg=PA470&printsec=frontcover|title=High Performance Computing - HiPC 2008|language=en|year=2008|access-date=2021-10-15|author1=Ponnuswamy Sadayappan|author2=Manish Parashar|author3=Ramamurthy Badrinath|author4=Viktor K. Prasanna|isbn=978-3-540-89893-1}}</ref>
<ref name="C10M" />
<ref name="C10M" />


== C10M problem ==
"The '''C10M''' problem relates to the classic '''C10k''' problem. Defined as supporting 10 million concurrent connections on a single machine, it remains a challenging problem not only for web servers, but for any [[Server (computing)|Internet server]] in general."
<ref name="C10M">{{Cite web|url=https://migratorydata.com/blog/migratorydata-solved-the-c10m-problem/|title=How MigratoryData solved the C10M problem: 10 Million Concurrent Connections on a Single Commodity Server|website=migratorydata.com|language=en|date=2015-05-20|access-date=2021-10-15|author=Mihai Rotaru}}</ref>
<ref name="C10M-howto">{{Cite web|url=https://migratorydata.com/blog/migratorydata-with-12-million-concurrent-websockets/|title=Scaling to 12 Million Concurrent Connections: How MigratoryData Did It|website=migratorydata.com|language=en|date=2013-10-10|access-date=2021-10-15|author=Mihai Rotaru}}</ref>
<ref name="C10M-middleware-2017">{{cite journal |last1=Rotaru |first1=Mihai |last2=Olariu |first2=Florentin |last3=Onica |first3=Emanuel |last4=Rivière |first4=Etienne |display-authors= |date=December 2017 |title=Reliable messaging to millions of users with MigratoryData |url=https://arxiv.org/pdf/1712.09876.pdf |journal=Proceedings of the 18th ACM/IFIP/USENIX Middleware Conference: Industrial Track |pages=1–7 |doi=10.1145/3154448.3154449}}</ref>


== See also ==
== See also ==

Revision as of 03:00, 17 November 2021

The C10k problem is the problem of optimizing network sockets to handle a large number of clients at the same time.[1] The name C10k is a numeronym for concurrently handling ten thousand connections.[2] Note that concurrent connections are not the same as requests per second, though they are similar: handling many requests per second requires high throughput (processing them quickly), while a high number of concurrent connections requires efficient scheduling of connections. In other words, handling many requests per second is concerned with the speed of handling requests, whereas a system capable of handling a high number of concurrent connections does not necessarily have to be a fast system, only one where each request will deterministically return a response within a (not necessarily fixed) finite amount of time.

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 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 the I/O management.[2]

History

The term C10k was coined in 1999 by Dan Kegel,[3][4] citing the Simtel FTP host, cdrom.com, serving 10,000 clients at once over 1 gigabit per second Ethernet in that year.[1] 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.[5]

By the early 2010s millions of connections on a single commodity 1U rackmount server became possible: over 2 million connections (WhatsApp, 24 cores, using Erlang on FreeBSD),[6][7] 10–12 million connections (MigratoryData, 12 cores, using Java on Linux).[5][8]

Common applications of very high number of connections include general public servers (or even private servers of very big companies whose sparse offices are connected to those servers via their VPNs) that have to serve thousands or even millions of users at a time, such as file servers, ftp servers, proxy servers, web servers, load balancers, etc. [9][5]


C10M problem

"The C10M problem relates to the classic C10k problem. Defined as supporting 10 million concurrent connections on a single machine, it remains a challenging problem not only for web servers, but for any Internet server in general." [5][8][10]

See also

References

  1. ^ a b "The C10K problem". Archived from the original on 2013-07-18.
  2. ^ a b Liu, D.; Deters, R. (2009). "The Reverse C10K Problem for Server-Side Mashups". Service-Oriented Computing – ICSOC 2008 Workshops. Lecture Notes in Computer Science. Vol. 5472. p. 166. doi:10.1007/978-3-642-01247-1_16. ISBN 978-3-642-01246-4.
  3. ^ Andrew Alexeev (2012). "§14. nginx; §14.1. Why Is High Concurrency Important?". In Amy Brown; Greg Wilson (eds.). The Architecture of Open Source Applications, Volume II: Structure, Scale and a Few More Fearless Hacks. Lulu.com. ISBN 9781105571817. Around ten years ago, Daniel Kegel, a prominent software engineer, … Kegel's C10K manifest … solving the C10K problem of 10,000 simultaneous connections, nginx
  4. ^ Kegel, Dan (8 May 1999). "The C10K problem". Kegel com. Archived from the original on 8 May 1999. Retrieved 18 June 2019. 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.
  5. ^ a b c d Mihai Rotaru (2015-05-20). "How MigratoryData solved the C10M problem: 10 Million Concurrent Connections on a Single Commodity Server". migratorydata.com. Retrieved 2021-10-15.
  6. ^ "1 million is so 2011". WhatsApp blog. 6 January 2012. Archived from the original on 1 May 2014. Retrieved 25 July 2019. This time we also wanted to share some more technical details with you about hardware, OS and software: hw.machine: amd64 hw.model: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz hw.ncpu: 24 hw.physmem: 103062118400 hw.usermem: 100556451840
  7. ^ Reed, Rick (30 March 2012). "Scaling to Millions of Simultaneous Connections" (PDF). Erlang Factory. p. 7. Archived from the original (pdf) on 9 July 2012. Retrieved 25 July 2019.
  8. ^ a b Mihai Rotaru (2013-10-10). "Scaling to 12 Million Concurrent Connections: How MigratoryData Did It". migratorydata.com. Retrieved 2021-10-15.
  9. ^ Ponnuswamy Sadayappan; Manish Parashar; Ramamurthy Badrinath; Viktor K. Prasanna (2008). High Performance Computing - HiPC 2008. ISBN 978-3-540-89893-1. Retrieved 2021-10-15.
  10. ^ Rotaru, Mihai; Olariu, Florentin; Onica, Emanuel; Rivière, Etienne (December 2017). "Reliable messaging to millions of users with MigratoryData" (PDF). Proceedings of the 18th ACM/IFIP/USENIX Middleware Conference: Industrial Track: 1–7. doi:10.1145/3154448.3154449.