📜 ⬆️ ⬇️

How to solve the problem of 10,000 connections?



Ways to solve this problem, raised 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 under cat.

Of the approaches considered before, the prefork model works, but is wasteful in terms of memory, and select () does not work at all.

The course author Alexander Patrakov explains which functions can be called instead of select () so that the program rewritten with their use 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 whether it can handle 10,000 connections.

And how many simultaneous connections will the astrological server sustain on your laptop?



Slides are available here.

Previous lectures:
1. A course for those who are not afraid of UNIX and C
2. Each client in the process
3. Implement the protocol or how astrologers work
4. How to read to the end
5. Automata-style programs - translation difficulties
6. How to do several things at the same time and at the same time in turn?
7. Effective reading
8. How to make the program impatient?

Source: https://habr.com/ru/post/146340/


All Articles