文章 2018-03-19 来自:开发者社区

关于nginx keep-alive 参数的验证和心得

用chrome连接nginx服务器(nginx+spero),发现每次请求结果返回给浏览器后,会过一会才会运行 ngx_http_close_connection函数,可以看到nginx返回给chrome的header和结果是: HTTP/1.1 200 OK Server: nginx Date: Fri, 15 Apr 2016 08:39:50 GMT Content-Type: text....

文章 2011-06-07 来自:开发者社区

Nginx设置Keep-Alive为close

nginx不能在响应头部添加Keep-Alive,详见:http://wiki.nginx.org/HttpCoreModule#keepalive_timeout   http1.1中默认的keep-alive为connection(使用持久化连接),在http1.0中则默认为close,在大并发量的情况下可能需要将客户端的连接close掉,以保障服务器的正常运转。(因为每一台服务器它...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

{"cardStyle":"productCardStyle","productCode":"aliyun","productCardInfo":{"productTitle":"部署Nginx并通过Ingress暴露和监控服务","productDescription":"在阿里云容器服务(后简称ACK)集群中通过YAML文件快速部署一个Nginx应用并通过Nginx Ingress暴露和监控服务,结合使用ACK、日志服务、专有网络搭建业务部署运维方案。","productContentLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress","isDisplayProductIcon":true,"productButton1":{"productButtonText":"方案详情","productButtonLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress"},"productButton2":{"productButtonText":"一键部署","productButtonLink":"https://help.aliyun.com/document_detail/2400022.html"},"productButton3":{"productButtonText":"查看更多技术解决方案","productButtonLink":"https://www.aliyun.com/solution/tech-solution/"},"productPromotionInfoBlock":[{"$id":"0","productPromotionGroupingTitle":"解决方案推荐","productPromotionInfoFirstText":"MSE实现全链路灰度","productPromotionInfoFirstLink":"https://www.aliyun.com/solution/tech-solution/iflgbomse","productPromotionInfoSecondText":"云架构必修课:云上高可用架构","productPromotionInfoSecondLink":"https://www.aliyun.com/solution/tech-solution/hablog"}],"isOfficialLogo":false},"activityCardInfo":{"activityTitle":"","activityDescription":"","cardContentBackgroundMode":"LightMode","activityContentBackgroundImageLink":"","activityCardBottomInfoSelect":"activityPromotionInfoBlock"}}
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等