In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about what is Nginx. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
I. Overview of Nginx
Nginx ("engine x") is a high-performance HTTP and reverse proxy server, which is characterized by low memory, strong ability to handle high concurrency, and can withstand high load. It has been reported that it can support up to 50000 concurrent connections.
II. Nginx application scenario 2.1and Nginx as web server
Nginx can be used as a web server for static pages, and it also supports dynamic languages of CGI protocol, such as perl, php, etc., but does not support java
2.2, Nginx as a forward proxy server
Forward agent: the legendary agent, who works like a springboard. To put it simply, I am a user, I cannot access a website, but I can access a proxy server, this proxy server, he can access the website that I cannot access, so I connect to the proxy server first. Tell him that I need the content that cannot be accessed from the website, and the proxy server will retrieve it and return it to me. From the point of view of the website, there is only one record when the proxy server comes to pick up the content. The conclusion is that a forward proxy is a server between the client and the original server (origin server). In order to get content from the original server, the client sends a request to the agent and specifies the target (the original server), and then the agent transfers the request to the original server and returns the obtained content to the client. The client must make some special settings to use the forward proxy.
2.3.The Nginx acts as the reverse proxy server
Reverse proxy, for the client, it is like the original server, and the client does not need to make any special settings, we just need to send the request to the reverse proxy server, the reverse proxy server selects the target server to obtain the data, and then returns it to the client. In this case, the reverse proxy server and the target server are external servers, and the proxy server address is exposed. The real server IP address is hidden.
2.4.The Nginx acts as the load balancing server
The client sends multiple requests to the server, and the server processes the requests, and some of them may interact with the database. After the server has finished processing, the results are returned to the client.
This architecture model is suitable and low-cost for early systems where there are relatively few concurrent requests. However, with the continuous growth of the amount of information, the rapid growth of access and data, and the increase of the complexity of the system business, this architecture will cause the request of the corresponding client of the server to become slower and slower, especially when the concurrency is very large. it is also easy to cause the server to crash directly. This is obviously due to a bottleneck in server performance, so how do you solve this situation?
The first thing that comes to mind may be to upgrade the configuration of the server, such as increasing the frequency of CPU execution, increasing memory, etc., to improve the physical performance of the machine to solve this problem, but we know that with the increasing invalidation of Moore's Law, the performance improvement of hardware can no longer meet the increasing demand. The most obvious example is that on the day of Tmall's Singles Day, the instantaneous traffic of a hot-selling product is extremely large, so similar to the above system architecture, adding machines to the existing top physical configuration will not be able to meet the demand. So what should I do?
In the above analysis, we have removed the method of increasing the physical configuration of the server to solve the problem, that is to say, the vertical solution to the problem does not work, so what about increasing the number of servers horizontally? At this time, the concept of clustering came into being, which cannot be solved by a single server, so we increase the number of servers, and then distribute the requests to each server, instead of concentrating the original requests on a single server to distribute the requests to multiple servers. Distribute the load to different servers, which is what we call load balancing
Nginx as a static resource access server
Put static html pages, css styles, js scripts, pictures and other static resources on the server, and then use Nginx as the static resource access server to access the external address.
The above is the editor for you to share what is Nginx, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are 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.