In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the meaning of "reverse proxy, static and dynamic separation, load balancing in Nginx". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn "what is the meaning of reverse proxy, static and dynamic separation and load balancing in Nginx".
Brief introduction of Nginx
Nginx was designed and developed by lgor Sysoev for the second most visited rambler.ru site in Russia. Since its release in 2004, with the power of open source, it has been close to maturity and perfection.
Nginx has rich functions and can be used as HTTP Web server, reverse proxy load balancing server, mail server and so on. Support FastCGI, SSL, Virtual Host, URL Rewrite, Gzip and other functions. And support many third-party module extensions.
Advantages of Nginx
As a Web server: it uses fewer resources, supports more concurrent connections and embodies higher efficiency than Apache,Nginx, which makes Nginx especially popular among web hosting providers. Can support up to 50000 concurrent connections response, thank Nginx for choosing epoll and kqueue for us as the development model.
As a load balancing server: Nginx can not only directly support Rails and PHP internally, but also support external services as a HTTP proxy server. Nginx is written in C, both in terms of system resource overhead and CPU use efficiency is much better than Perlbal.
As a mail proxy server: Nginx is also an excellent mail proxy server (one of the earliest purposes of developing this product is also as a mail proxy server), Last.fm describes the successful and wonderful experience.
Tengine
Tengine is a Web server project initiated by Taobao. On the basis of Nginx, it adds a lot of advanced functions and features to meet the needs of high-volume websites. The performance and stability of Tengine have been well tested in large websites such as Taobao and Tmall Mall. Its ultimate goal is to create an efficient, stable, secure and easy-to-use Web platform. Official website.
Reverse proxy
To talk about reverse proxy, we must first understand forward proxy.
Forward agent
In today's network environment, if we have to visit some foreign websites because of technical needs, you will find that there is no way for us to visit a website located abroad through a browser. at this time, everyone may climb over the wall to visit, the main way to climb the wall is to find a proxy server that can access foreign websites, we will send the request to the proxy server, the proxy server to visit foreign websites. Then pass the accessed data to us!
The most important feature of the forward proxy is that the client is very clear about the server address to be accessed; in the end, the server only knows which proxy server the request comes from, but not which specific client; the forward proxy mode shields or hides the real client information.
To sum up the forward agent, it is the client that acts as the agent.
Reverse proxy
Reverse proxy (Reverse Proxy) means that the proxy server accepts the connection request on the internet, then forwards the request to the server on the internal network, and returns the result obtained from the server to the client requesting the connection on the internet. At this time, the proxy server behaves as a reverse proxy server.
For example, when a user goes to a treasure to buy something, we don't have to care about how it is configured in the background. I only know that I visit the proxy server of a treasure, and the proxy server will provide data to us on behalf of all the servers.
The reverse agent summarizes in one sentence: the agent side is the server side.
Dynamic and static separation
The dynamic and static separation is to make the dynamic web pages in the dynamic website distinguish the immutable resources from the frequently changing resources according to certain rules. after the dynamic and static resources are split, we can cache them according to the characteristics of static resources. this is the core idea of website static processing.
The simple summary of dynamic and static separation is: the separation of dynamic resources and static resources.
In our software development, some requests are dynamic data in the latter section, and some requests are static resources that do not need to be processed in the background (such as css, html, image, js, etc.). These resources that do not need to be processed in the background are called static resources, otherwise they are dynamic resources.
Static and static separation deploys website static resources (HTML,JavaScript,CSS,img and other files) separately from background applications to improve the speed of users' access to static code and reduce access to background applications. For example, we put static resources into nginx and dynamic resources are forwarded to the tomcat server.
Load balancing
In the early days of the Internet, the business traffic was relatively small and the business logic was relatively simple, and a single server could meet the basic needs; but with the development of the Internet, the business traffic became larger and larger and the business logic became more and more complex. the performance problems and single point problems of a single machine are highlighted, so multiple machines are needed to expand the performance level and avoid a single point of failure. But how do you distribute traffic from different users to different servers?
The idea of load balancing is that the traffic of the client is first sent to the load balancing server, and the load balancing server distributes the traffic to different application servers through a certain scheduling algorithm to solve the concurrent pressure of a single machine.
For example, for a certain treasure website, the number of visitors who connect to the website at the same time every day has exploded, and a single server is far from being able to meet the people's growing desire to buy. At this time, more and more servers are needed to solve the problem of the number of concurrent visitors per machine.
The above is all the content of this article "what is the meaning of reverse proxy, static and dynamic separation and load balancing in Nginx". 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.