3 ms·
You don't need million threads to be really fast. You need enough threads for your load. If you need to handle 1000 requests per second with each request taking
by vbezhenar 8y ago
You don't need million threads to be really fast. You need enough threads for your load. If you need to handle 1000 requests per second with each request taking 10 ms in average, you need 100 threads. It's absolutely adequate number of threads for OS to manage. If you would write this code with async style, you won't achieve anything, because bottleneck would be with database or another service or disk I/O. Million threads is very rare case.