In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "nginx upstream how to open keepalive", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "nginx upstream how to open keepalive" this article.
Nginx upstream enables keepalive
Upstream tomcat {server ops-coffee.cn:8080; keepalive 1024;} server {location / {proxy_http_version 1.1; proxy_set_header Connection "; proxy_pass http://tomcat;}}
Nginx is used as a reverse proxy in most cases in the project, such as nginx followed by tomcat,nginx followed by php, etc. When we enable keepalive between nginx and back-end services, we can reduce the resource consumption caused by frequent creation of TCP connections, as above
Keepalive: specifies that the maximum number of connections that can be maintained by each nginxworker is 1024, which is not set by default, that is, keepalive does not take effect when nginx is used as client.
Proxy_http_version 1.1: enabling keepalive requires the HTTP protocol version to be HTTP 1.1
Proxy_set_header Connection "": in order to be compatible with the old protocols and to prevent keepalive failure caused by Connection close in the http header, the Connection in the HTTP header needs to be cleared in time.
The above is all the content of the article "how to start keepalive with nginx upstream". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.