Nginx and Apache pros and cons

Know almost from  Chen Chong Cham  answer: https: //www.zhihu.com/question/19571087/answer/12313829
 
apache nginx relative advantages:
  • 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
apache nginx relative advantages:
  • rewrite, rewrite nginx powerful than the
  • Module over more basic thought can be found
  • Little bug, nginx relatively large number of bug
  • Ultra-stable
Is the reason there is, in general, require the performance of web services, using nginx. If you do not just stable performance, then apache it. The latter have various functional modules implemented than the former, it is a good example ssl former module, multiple items can be configured.
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

 

Guess you like

Origin www.cnblogs.com/qccz123456/p/11482304.html