My question is based on a few assumptions so please correct me on any of them below
- I know that TCP has always been socket based
- In order for a server to maintain that socket, a thread has to block and wait for IO on the server side
- A modern web server has to handle at least hundreds if not thousands of requests per second
- Even if the work is spawned off as separate threads with callbacks to the socket thread, this would mean thousands of threads running at a time on the server
Current software engineering, especially reactive frameworks, discourages running lots of threads, so I’m wondering whether modern HTTP servers still run thousands of threads or is there kind of a “reactive” way that they’re handling that many clients at a time?