3 ms·
Apache is using concurrent threads and nginx is just doing monothreaded asyncio. Is has consequences if you have many users, and depending of the average length
by sametmax 9y ago
Apache is using concurrent threads and nginx is just doing monothreaded asyncio. Is has consequences if you have many users, and depending of the average length of connexions. For a few users and short connexions, you probably won't see much difference.
My guess would be that apache is a tad faster (if you choose the proper mpm) and nginx uses a bit less memory (if you tell it to spaw only one worker), but that's just a hunch and is probably barely noticeable with 4/5 users at the same time.
- reacharavindh 9y agoCool. Thanks for the insight. At work, we have a web server that is not allowed to run any other workloads(for security and isolation needs). It hosts only static files. Occasionally big datasets that people download over http. I will look into tuning Apache instead of moving it to nginx. I was going by the word of mouth wisdom that nginx was "faster" and noted for myself to check which on earth had better latency at lower loads..
- jlgaddis 9y agoUnless you're doing a lot of requests (or RPS), it probably isn't even worth the time to bother with any tuning.