4 ms·
Isn't that problem generally easily solved with a thread pool ? (that's what nginx does I believe)
by cassepipe 3y ago
Isn't that problem generally easily solved with a thread pool ? (that's what nginx does I believe)
- miki123211 3y agoThere are use cases where a thread pool doesn't solve your problem. If you're handling a few short-lived connections at a time, it's more than enough, but if you're developing something like a push / messaging / queuing service, with thousands of clients connected for hours at a time and receiving very little data once every few minutes, a thread pool won't help you.
- starcraft2wol 3y ago> a thread pool won't help you. What do you see as the main limitations of spawning 2048 threads in a pool in this scenario?
- super_flanker 3y ago2048 threads would be fine, but they are talking about 10s of thousands of clients.
- usrbinbash 3y agoThis is a solved problem. I can run millions of goroutines on a laptop. These get mapped to a relatively small number (number of available CPU cores with default settings) by the runtime.