There are many types of servers. What is the mirror server? What role does it have?
The service content of the Mirror server and the main server are the same, but they are placed in a different place to share the load of the host.
In simple terms, it looks like looking in a mirror and can be seen, but not the original. Two or more servers with identical online content and synchronized updates, with the exception of the main server, are called mirror servers.
The role of the mirror server
1. Load balancing based on specific server software
This technology uses the redirection function of the network protocol to achieve load balancing. For example, the positioning instruction is supported in the Http protocol. The browser receiving this instruction will automatically redirect to another URL specified by the instruction. Because the load of sending the positioning instruction to the Web server is much smaller than the execution of the service request, a load-balanced server can be designed based on this function. Once the web server thinks that it has a large load, it no longer directly sends back the webpage requested by the browser, but sends back a positioning instruction to let the browser go to other servers in the server cluster to obtain the required webpage. In this way, the server itself must support this function, but there are many difficulties in implementing it. For example, how can a server ensure that the server it redirects to is idle and does not send positioning instructions again? Neither directives nor browsers have this support, which can easily create an endless loop on the browser. Therefore, this method is not common in practical applications, and there are fewer server cluster software implemented using this method.
DNS-based load balancing
DNS load balancing technology is the earliest load balancing solution. It is achieved by random name resolution in DNS service. In DNS server, you can configure the same name for multiple different addresses, and finally query the customers of this name The machine will get one of these addresses when resolving the name. Therefore, for the same name, different clients will get different addresses, and they will access the Web server at different addresses, so as to achieve the purpose of load balancing.
3. Load balancing based on Layer 7 switching technology
Load balancing technology based on Layer 7 switching is mainly used to implement load balancing and service quality assurance for Web applications. Compared with Layer 4 switches, it has many advantages: Layer 7 switches can not only check the TCP and UDP port numbers of TCP / IP data packets, and then forward them to a server in the background for processing, but also analyze them from above the session layer. The URL of the HTTP request. Depending on the URL, different HTTP requests are sent to different servers for processing (can be specific to a certain type of file, up to a certain file), and even the same URL request can let multiple servers respond to share. Load (When a client visits a certain URL and initiates an HTTP request, it actually has to establish multiple session connections with the server and get multiple objects, such as .txt / .gif / .jpg files. After these objects are downloaded locally To form a complete page).
4. Site mirroring technology
The above several load balancing technologies are mainly applied to a server farm within a site, but since the bandwidth of a site accessing the Internet is limited, the load balancing technology can be applied to different network sites. This is the site mirroring technology. Site mirroring technology actually uses DNS load balancing technology.
Of course, in today's Internet, each server has its own advantages. How to make the server better for us needs more improvements. The mirror server also provides a load balance between the servers. A lot of effort.
Hello there!
Thanks for using XRCLOUD. We strive to provide the highest quality and care deeply about your concerns.