3 ms·
Thread-per-request seems even more correct to me, given the increased cost of system-calls, now that Spectre and Meltdown fixes are in.
by phkamp 9y ago
Thread-per-request seems even more correct to me, given the increased cost of system-calls, now that Spectre and Meltdown fixes are in.
- jeremiep 9y agoI used to do thread-per-request, that has mediocre scaling at best. Even on the JVM this barely scales to a few thousand connections; native threads are heavier than that. I've also done a lot of task-per-request (with each thread's affinity locked to a single hardware thread to avoid ripple effects), which does scale at least an order of magnitude more than threads. I now use fiber-per-request for the best of both worlds: the easy sequential model of threads, yet the simple performance of tasks. I can't understand why someone would defend the thread-per-request model at this point. It wasn't even a good model 10 year ago.
- kev009 9y agoCorrect