Async vs Threading for Web Servers
June 23, 2022•70 words
Consideration
Number of possible requests at the same time: 10,000
Async
- Single thread
- 10k requests in async mode jam processing but that is slow down instead of running out of CPU capacity
Multi-threading
- Multiple threads
- 10k requests make 10k threads, this is uncontrollable and isn't good for CPU thread management
Conclusion
Web server should run in async mode instead of
multi-threading mode.