
How to solve the problem of 10,000 connections?

Ways to solve this problem, raised back in 2001 by programmer Dan Kegel, are discussed in the ninth lecture of the course "Network Programming in UNIX", prepared by SkyDNS and Aydeko . For details - welcome to cat.
Of the approaches considered before, the prefork model works, but it is wasteful in terms of memory, and select () does not work at all.
The author of the course, Alexander Patrakov, explains what functions can be called instead of select () so that the program rewritten using them can efficiently handle a large number of simultaneous connections.
The practical task was to rewrite the astrological server using the epoll () family of functions and check if it can handle 10,000 connections.
And how many simultaneous connections will the astrological server withstand on your laptop?
Slides are available here.
Previous lectures:
1. A course for those who are not afraid of UNIX and C
2. To each client according to the process
3. We implement the protocol or how astrologers work
4. How to read until the end
5. Automatic programs - translation difficulties
6. How do several things at the same time and at the same time take turns?
7. Effective reading
8. How to make the program impatient?