title: HTTP 1.1 server sending large files
body: <p>I've read an article about serving a lot of clients with a custom HTTP 1.1 server. It said that one needs to utilize a thread pool with as many threads as there are CPU cores, not spawn a new thread for each request. But, say a file is 1 GB long. It's transfer would halt one of the queues in the thread pool, while the file is being transferred, halting the processing of new requests. Surely a thread is spawned when transferring such files? But what criterion is applied to determine whether a new thread is to be spawned to serve a request, file size? Or some other? Perhaps some form of cooperative multitasking is used?</p>