Use load balancing technology to build high load network sites (2)

Source: Internet
Author: User
Tags reset domain
Network | site

Many network protocols support the "Reset to" feature, such as supporting the location instruction in the HTTP protocol, and the browser receiving the instruction will automatically reset to another URL specified by location. By sending location instructions, the Web server is much less loaded than executing service requests, so you can design a load-balanced server based on this feature. At any time, when the Web server thinks its load is large, it will no longer send it directly back to the browser-requested page, but instead send back a locaction instruction to allow the browser to get the required Web pages from other servers in the server cluster.

In this way, the server itself must support this functionality, but there are many difficulties in implementing it, for example, how can a server guarantee that it is more idle to reset to the server and will not send location instructions again? Location directives and browsers do not have this support capability, so it is easy to form a dead loop on the browser. Therefore, there are few practical applications in this way, and the server cluster software implemented in this way is less. In some cases, CGI (including the use of fastcgi or Mod_perl extensions to improve performance) can be emulated to share the load, while the Web server remains simple and efficient, and the task of avoiding the location cycle will be borne by the user's CGI program.

2. Load balancing of Base DNS

The load balancing of the base server software needs to change the software, so it is often not worth the load balancing, preferably outside the server software, to take advantage of the existing server software. The earliest load-balancing technique is implemented by random name resolution in DNS services, where a DNS server can configure the same name for several different addresses, and the client that eventually queries the name will get one of the addresses when parsing the name. Therefore, for the same name, different customer opportunities to get different addresses, they also access the different address of the Web server, so as to achieve load balancing purposes.

For example, if you want to use three Web servers to respond to HTTP requests for www.exampleorg.org.cn, you can set the DNS server for that domain to have data on that domain, including results similar to the following example:

WWW1 in A 192.168.1.1
WWW2 in A 192.168.1.2
WWW3 in A 192.168.1.3
www in CNAME www1
www in CNAME www2
www in CNAME www3



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.