Decompression billabong: Talk about the laden and balanced service of IDC computer room

January 28, 2008

Major individual website is space of a when with a few people about a hundred person shares fictitious lead plane only probably at the beginning, grow as what the addition of content and visit measure next, the bandwidth of fictitious lead plane, space cannot have satisfied requirement, stationmaster has to begin to consider to purchase an independent server for the website, use 100M is shared is 10M enjoys bandwidth alone even; And continue to develop when the website, the user of the visit also has spread all over great river north and south, stationmaster must consider the each other that telegraphic net tells to understand a problem again, in south and north each place a server to regard a mirror as the site, or it is to use crewel to be received; Visit when this website when the amount is larger, blindly increase bandwidth and setting mirror site to be able to make undoubtedly leap of website operation cost, add individual server itself to also have the bottleneck of function and line Cheng, measure in intercurrent visit bigger and when be being centered in a server, “Server Too Busy ” appeared, and at this moment what means should stationmaster use to make does the website still have better visit effect when is tall visit measured?

This is inscribed to laden and balanced word with respect to drag in.

CDN has discussed before us, actually CDN besides quicken besides, also have the effect of billabong, because this also has many application in laden and balanced domain, actually basically cache (Cache) + mirror technique has billabong effect, but how billabong still needs a laden and balanced equipment to undertake introductory, so, we discuss laden and balanced technique technically today.

   About laden and balanced service:

Laden and balanced service can balance a server group the communication between all medium servers and application is laden, undertake judging according to answering time in real time, make the task by load the lightest server is handled, in order to realize right intelligent communication government and first-rate server group function. The application that control of laden and balanced technology goes to the 7th the 4th layer / content, realized first step to differentiate to serve with the difference to the client of different type and application thereby, use conversation of the 7th intelligence to restore a technology, can detect at the same time a HTTP 400, the 500 mistakes with 600 series. It will trade transparently new and directional to another server, make the system can be finished thereby should trade. Server breakdown switch and multiple and redundant character can let communication bypass breakdown is nodded, make the website maintains from beginning to end thereby move and can visit a gender.

   Implement laden and balanced method:

About implementing laden and balanced method, there also is not less relevant discussion on the net, do below a few cite:

   The load that is based on specific server software is balanced

Agreement of a lot of networks supports ” heavy directional ” function, support Location to dictate in HTTP agreement for example, the browser that receives this instruction will be weighed automatically directional go up to another URL of Location demonstrate. Because send Location instruction to request compared with executive service, want to the load of Web server many small, because this is OK,design a kind of laden and balanced server according to this function.

When any moment Web servers think him load is bigger, it sends the webpage that answers browser plea directly no longer, remand however instruction of a Location, let a browser obtain the webpage of a need.

Below this kind of means, server itself must support this kind of function, however it is difficult that specific implementation rises to have a lot of however, the exemple is consistent how can stage server make sure it is heavy directional the server that pass is more disengaged, and won’t send Location statement again, location instruction and browser do not have the supportive ability of this respect, form a kind of dead loop very easily on the browser so.

Because this kind of way is effective,do not see more among application, the server group software that uses implementation of this kind of means is less also. CGI(can be used to include to use FastCGI or Mod_perl to expand below a little specific situation will improve performance) come this kind of kind goes imitate divide a load, and Web server still keeps concise, efficient character, the job that shuns Location loop right now will be assumed by the CGI program of the user.

   The load that is based on DNS is balanced

Because be based on the laden and balanced need of server software,alter software, often the loss outweights the gain accordingly, load is balanced and best it is to be besides server software will finish, such ability use a variety of dominant positions of existing server software. The earliest laden and balanced technology is the random name in serving through DNS analytic will come true, in DNS server, can think many different address configuration are same a name, and the client computer that inquires this name finally will be in analytic an among them address gets when this name. Accordingly, to same a name, distinct client opportunity gets different address, they also visit the Web server on different address, achieve laden and balanced goal thereby.

If hope to use 3 Web server,answer the HTTP of Www.ghq.net to request back and forth for example, include to have about the data of this region in the DNS server that can install this region with below the result with similar case:

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 this is external client computer is likely the different address that random gets corresponding Www, so subsequently HTTP requests to also deliver different address.

The advantage with DNS balanced load is simple, easy travel, and the server can be located in the random of Internet locally, use currently go up in the Web site that includes Yahoo inside. However it also is put in many defect, a defect is to make sure DNS data is updated in time, what should set the refresh time of DNS commonly is lesser, but too small discharge of the network outside can causing too large specified number, and altered DNS data later also cannot instantly become effective; 2 o’clock is DNS load balanced cannot be informed the difference between the server, it cannot accomplish better for function server to allocate a request more, also cannot know the current condition of the server, meet occurrence client request the occasional case that is centered on some stage server even.

   Retrorse representative load is balanced

Use representative server can give in-house Web the server request transmit, use this kind to quicken mode to be able to promote the visit of static webpage rate apparently. Because this also can consider use this kind of technology, let acting server will request even transmit to give one of servers of many in-house Web to go up, achieve laden and balanced goal thereby. Means of this kind of representative and common acting means differ somewhat, standard representative means is the client uses a representative to visit server of many exterior Web, and means of this kind of representative is many clients use it to visit in-house Web server, because this also is called,act as agent reversely mode.

Realize ability of this retrorse representative to be able to not be a particularly complex task, but in load balanced in the efficiency with particularly high demand, such implementation rise is not very simple. Every act as agent in the light of, acting server must open two join, one is external join, one is internally join, because this requests to join when the amount is very large, the load of acting server special also big, in retrorse finally representative the server can become the bottleneck of the service.

For example, when the Mod_rproxy module of use Apache will realize laden and balanced function, offerred intercurrent join measure accepts the restriction of the intercurrent join amount of Apache itself. Will tell commonly, can using it to come is not particularly big to join amount, but join the site that needs to drain many processing resource has load every time balanced, search for for example.

The profit that uses retrorse representative is, can will laden balanced the technology of high speed cache with acting server is united in wedlock together, provide good performance, have additional security, exterior client cannot visit true server directly. And implementation rises can implement better laden and balanced strategy, will laden OK and special server of balanced deal out interior, won’t appear the accidental phenomenon that load centers a certain server.

   Be based on the laden and balanced technology of NAT

Network address changeover is changed to undertake between interiorly address and exterior address, so that have the computer of in-house location to be able to visit exterior network, and the some that visits an address to change gateway to have when the computer in exterior network is exterior when the address, the address changes gateway to be able to go to its transmit on the in-house address of a map. So if address changeover gateway can join every even changeover is different in-house server address, after this is exterior the computer in the network changes the server on gotten address to have communication with oneself severally, achieve the goal that load partakes thereby.

Address changeover can come true through software means, also can come true through hardware means. Use hardware means undertakes operating calling trade commonly, and when exchange must save TCP join information, this kind of operation that is aimed at OSI network layer is called the 4th to exchange. The network address with balanced holding load changes a kind of when be the 4th switching equipment main function, because it is based on custom-built hardware chip, its performance is very accordingly excellent, a lot of switching equipment claim to have the capacity of the 4th exchange of 400MB-800MB.

Use software means will realize the load that is based on network address changeover balanced want many actual, besides the means of settlement that offers besides a few manufacturers, more effective method is to use free free software to finish this job. The NAT in including Linux Virtual Server Project among them realizes way, or the revised edition that article author issues pair of Natd in FreeBSD this. Will tell commonly, use means of this kind of software to realize address changeover, existence of central load equalizer carries wide restriction, below the condition of fast aether net of 100MB, can get amounting to the bandwidth of 80MB the most quickly, in applying actually however, the likelihood has the usable bandwidth of 40MB-60MB only.

IDCOfferred laden and balanced service

IDCOfferred laden and balanced service has:

Load of this locality of kinds of big group is balanced
(Server Load Balancing) shares load balanced
(Shared Load Balancing Service) enjoys laden and balanced service alone
(Load of ground of different of Dedicated Load Balancing Service) is balanced service
(Load of ground of different of Website Load Balancing Service) is balanced service
(Website Load Balancing Service)

The professional and laden balanced service that Internet data center provides, can become this locality load in the light of the server of the user balanced (Server Load Balancing) , laden and balanced equipment uses driving and effective laden and balanced algorithm, answer according to actual noise time, undertake between the server with different function laden intelligence allocates, make full use of server group each medium server, protection has investment, the server that makes sure performance is average already does not become systematic bottleneck, the server resource that also makes sure performance is high gets be usinged adequately. Center of major data of telegraphic IDC Internet built the laden and balanced establishment that share (Shared Load Balancing) , the laden and balanced establishment that the server of the purchases this appreciation service all and mandatory client of this computer room can share a computer room to purchase, be aimed at user of a few high end, center of a few data still was rolled out enjoy laden and balanced service alone (Dedicated Load Balancing Service) , this service basically is to avoid to share user contention load the likelihood of balanced equipment resource, and the laden and balanced establishment that can build oneself alone for individual and large client, achieve favorable result in order to assure.

Share laden and balanced service (mandatory client of Shared Load Balancing Service) can share IDC jointly with other client share laden and balanced establishment (Shared Load Balancing) , with low price, obtain the laden and balanced service of the server.

Enjoy laden and balanced service alone (Dedicated Load Balancing Service) IDC also can offer the laden and balanced establishment that enjoys alone for mandatory client, below the circumstance that ensures data is safe, achieve better laden and balanced result.

But, only right this locality server (point to this computer room server namely) have load balanced it is insufficient, intercurrent visit measures the site that needs laden and balanced service for the most part bigger, these site majority are discrepant ground mirror server, the laden and balanced device that because of this a few more professional IDC the computer room uses returns way of OK and penetrable network by, have the load between site of different ground mirror balanced, this kind of load is balanced call different ground load balanced (Website Load Balancing) .

Different ground load is balanced service (the laden and balanced service of Website Load Balancing Service) IDC, road of OK and penetrable network by, have the load between site of different ground mirror balanced.

   The more of laden and balanced service serves a target:

Balanced service is not load to perhaps become independent in the light of mandatory server only server, a few kinds of when mention above laden also and balanced services can are opposite the firewall of the user (Firewall Load Balancing) and fictitious lead plane (Virtual Hosting Load Balancing) has load balanced, its effect and fundamental also are general.

Tags: , , , , , ,