Talking about the load balancing service of IDC engine room!

  
                  

Most of the personal websites may be just a virtual hosting space shared by hundreds of people at the beginning. Then with the increase of content and the increase of the number of visits, the bandwidth and space of the virtual host can no longer meet the demand. Long, you have to start thinking about purchasing a separate server for the website, using 100M sharing or even 10M exclusive bandwidth; and when the website continues to develop, the users who visit it are already spread all over the country, and the webmaster has to consider the intercommunication problem of Telecom Netcom. Each server is placed in the South and North as a mirror site, or dual-line access; when the site has a larger amount of traffic, simply increasing the bandwidth and setting up the mirror site will undoubtedly increase the operating cost of the website, plus a single server. It also has performance and thread bottlenecks. When the number of concurrent accesses is large and concentrated on one server, "Server too busy" appears, and what method should the webmaster use to make the website still in high traffic? Have a better access effect?

This involves load balancing topic.

we discussed previously CDN, CDN addition to accelerating fact, it has shunt effect, so the load balancing field, there are many applications, in fact, basically Cache (Cache) + mirroring technology has split the role, But how to offload still requires a load balancing device to boot, so we are devoted to load balancing technology today.

About load balancing services:

The load balancing service can balance the communication load between all servers and applications in the server farm, judge according to the real-time response time, and hand over the tasks to the load. Light servers to handle to achieve true intelligent communication management and optimal server farm performance. Load balancing technology controls Layer 4 to Layer 7 applications/content, enabling prioritization and differentiated services for different types of customers and applications, using Layer 7 intelligent session recovery technology, and detecting HTTP 400, 500 and 600 The series of errors. It transparently redirects the transaction to another server, allowing the system to complete the transaction. Server failover and multiple redundancy features allow traffic to bypass the point of failure, keeping the site operational and accessible.

method of load balancing:

on load balancing methods to achieve, there are many online discussion, do some of the following references:

based on a specific server software load balancing


many network protocols support "redirect" features such as support Location directive in the HTTP protocol, the browser receives this command will be automatically redirected to another URL specified by Location on. Since the Send Location command is more than the execution of the service request, the Web server will not send the web page requested by the browser directly to the Web service at any time when the Web server considers itself to be heavily loaded. Instead, it sends back a Location. Directives that let the browser get the pages it needs on other servers in the server cluster.

In this way, the server itself must support this feature, but there are many difficulties to implement specific, such as how a server can guarantee that it redirected off the server is relatively idle and does not Sending the Location command again, the Location directive and the browser do not have this support, which makes it easy to form an infinite loop on the browser.

therefore practical application in this way is rare, the use of server clustering software implemented in this way is also less. In some cases, CGI (including the use of FastCGI or mod_perl extensions to improve performance) can be used to simulate this way to share the load, while the Web server still maintains a simple and efficient feature, in which case the task of avoiding the Location loop will be handled by the user's CGI program. Come to bear.

DNS-based load balancing


the need to modify software load balancing server software, thus often outweigh, load balancing is best accomplished outside of the server software In order to take advantage of the advantages of existing server software. The earliest load balancing technology is implemented by random name resolution in the DNS service. In the DNS server, the same name can be configured for multiple different addresses, and the client that finally queries the name will get the name when parsing the name. One of the addresses. Therefore, for the same name, different clients get different addresses, and they also access the Web server at different addresses to achieve load balancing.

example, if you want to deal with three Web server HTTP request www.ghq.net back and forth, can be set in the domain DNS server about the data field comprises the following examples with similar results:

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

After that, external clients may randomly get different addresses corresponding to www, and subsequent HTTP requests are sent to different addresses. Advantage

DNS load balancing is a simple, easy, and the server can be located anywhere on the Internet, currently used on Web sites, including Yahoo, including. However, it also has a number of shortcomings. One drawback is that in order to ensure timely update of DNS data, it is generally necessary to set the DNS refresh time to be small, but too small will cause too much extra network traffic, and after changing the DNS data. It can't take effect immediately; the second point is that DNS load balancing can't know the difference between servers. It can't allocate more requests for better-performing servers, nor can it know the current state of the server, or even the customer request concentration. Occasional situation on a server.

Reverse proxy load balancing


The use of a proxy server can forward requests to the internal web server. Using this acceleration mode can obviously improve the access speed of static web pages. Therefore, it is also conceivable to use this technology to allow the proxy server to evenly forward requests to one of the multiple internal web servers for load balancing purposes. This proxy method is different from the normal proxy method. The standard proxy method is that the client uses the proxy to access multiple external web servers. This proxy method is used by multiple clients to access the internal web server, so it is also called reverse. Proxy mode.

reverse proxy to achieve this capability and can not be regarded as a particularly complicated task, but requires a particularly high efficiency in load balancing, so it is not to implement a very simple. For each agent, the proxy server must open two connections, one for the external connection and one for the internal connection, so when the number of connection requests is very large, the load of the proxy server is very large, at the end A reverse proxy server can become a bottleneck for services.

example, using the Apache mod_rproxy modules to achieve load balancing, the number of concurrent connections provided by the number of concurrent connections limitation Apache itself. In general, you can use it to not have a particularly large number of connections, but each connection requires a site that consumes a lot of processing resources for load balancing, such as searching.

benefits of using a reverse proxy that can be combined with high-speed load balancing and caching proxy server together, provide a useful performance, with additional security, external customers can not directly access the real servers. And it can achieve a better load balancing strategy, and the load can be distributed to the internal server in a very balanced manner, without the accidental phenomenon that the load is concentrated on a certain server.

NAT-based load balancing technology


Network address translation is to convert between internal address and external address, so that computers with internal addresses can access external networks. When a computer in the external network accesses an external address owned by the address translation gateway, the address translation gateway can forward it to a mapped internal address. Therefore, if the address translation gateway can evenly convert each connection into a different internal server address, then the computers in the external network communicate with the server at the address obtained by the conversion, thereby achieving the purpose of load sharing.

address translation can be implemented by software, can also be achieved by hardware. Operation using hardware is generally referred to as switching, and when the exchange must hold TCP connection information, this operation for the OSI network layer is referred to as Layer 4 switching. The ability to support load-balanced network address translation is an important feature of Layer 4 switches. Because it is based on a custom hardware chip, its performance is excellent. Many switches claim to have a Layer 4 switching capability of 400MB-800MB.

ways to achieve using software based on network address translation load balancing will have practical and more, in addition to the solution provided by some vendors, more effective method is to use free of free software to accomplish this task. This includes the NAT implementation in the Linux Virtual Server Project, or the revision of the natd by FreeBSD. Generally speaking, using this software to implement address translation, the central load balancer has a bandwidth limitation. Under the condition of 100MB Fast Ethernet, it can get up to 80MB of bandwidth. However, in practical applications, it may only be 40MB- 60MB of available bandwidth.

load balancing service provided by IDC load balancing service


IDC provided are:


categories subcategories local load balancing
(Server Load Balancing) Shared Load Balancing Service
(Dedicated Load Balancing Service) Offsite Load Balancing Service
(Website Load Balancing Service) Offsite Load Balancing Service < BR> (Website Load Balancing Service) The professional load balancing service provided by the Internet data center can perform local load balancing (Server Load Balancing) for the user's server. The load balancing device adopts a powerful and effective load balancing algorithm according to the actual response time. Intelligent distribution of load between servers with different performances, making full use of each server in the server farm to protect existing investments, ensuring that the performance of the general server does not become a bottleneck of the system, and that the server resources with high performance are fully supported. use. Most of the telecom IDC Internet data centers have established shared load balancing (Shared Load Balancing), and all the managed customers' servers that purchase this value-added service in the equipment room can share the load balancing facilities purchased by the equipment room, targeting some high-end users. Some data centers also introduced the Dedicated Load Balancing Service, which is designed to avoid the possibility of shared users competing for load balancing device resources, and to establish their own load balancing facilities for individual large customers. To ensure good results.

Shared Load Balancing Service Managed customers can share IDC's Shared Load Balancing with other customers to get server load balancing services at a low cost.

Dedicated Load Balancing Service IDC can also provide managed customers with exclusive load balancing facilities to achieve better load balancing while ensuring data security. The amount of concurrent access to the site

however, only to the local server (that is, over which the server room) load balancing is not enough, most of the load balancing service needs are great, most of these sites are remote mirror server Therefore, load balancing devices used in some more professional IDC rooms can also penetrate network routes to load balance between remote mirror sites. This type of load balancing is called Website Load Balancing.

Website Load Balancing Service IDC's load balancing service can penetrate network routes and load balance between remote mirror sites.

More service objects for load balancing services:

The load balancing service is not only for managed servers or standalone servers. The above mentioned load balancing services can also be used for users' firewalls (Firewall) Load Balancing) and Virtual Hosting Load Balancing for load balancing, the effects and basic principles are also common.

Copyright © Windows knowledge All Rights Reserved