【运维面试向】简述apache和nginx优缺点

能答几个是几个。0.0

1.nginx更轻量级,比apache占用更少的内存和资源;

2.nginx处理请求是非阻塞的(异步请求),apache是阻塞型;

3.nginx处理静态文件更好。对动态文件处理不行;

4.nginx可以作为负载均衡,作为反向代理服务器;

5.nginx配置更简单,对虚拟主机配置更方便。

6.可以加入缓存功能,proxy_cache(模块),varnish,squid

apache

1、apache 的 rewrite 比 nginx 强大,在 rewrite 频繁的情况下,用 apache

2、apache 模块超多,

3、apache 更为成熟,少 bug 

4、apache 超稳定

5、apache 对 PHP 支持比较简单,nginx 需要配合其他后端用

6、apache 在处理动态请求有优势

注:epoll网络IO模型是nginx处理性能高的根本原因。

猜你喜欢

转载自blog.csdn.net/qq_33285694/article/details/82217614