Know almost from
Chen Chong Cham
answer: https: //www.zhihu.com/question/19571087/answer/12313829
apache nginx relative advantages:
Here we must note that, epoll (on freebsd is kqueue) network IO model is a high-performance processing nginx fundamental reason, but not all cases are epoll victory, if itself provides static service on only a few files, apache of select high-performance model may be more than epoll. Of course, this is only based on the principle of network IO model for a hypothetical real applications still need a repeat measurement of.
- Lightweight, also from the web service, take up less memory than apache and resources
- Anti concurrent, non-blocking Nginx processing request is asynchronous, and the apache is blocked type, low resource consumption Nginx high performance can be maintained under high concurrency
- Highly modular design, relatively simple to write a module
- Community activists, all kinds of high-performance modules produced rapidly ah
- rewrite, rewrite nginx powerful than the
- Module over more basic thought can be found
- Little bug, nginx relatively large number of bug
- Ultra-stable
Here we must note that, epoll (on freebsd is kqueue) network IO model is a high-performance processing nginx fundamental reason, but not all cases are epoll victory, if itself provides static service on only a few files, apache of select high-performance model may be more than epoll. Of course, this is only based on the principle of network IO model for a hypothetical real applications still need a repeat measurement of.
Summary: general pursuit of high concurrency with nginx, apache with stability; dynamic requests to do apache, nginx is only suitable for static and reverse.
Use nginx
Use apache