This article is limited to the Web Server section, as the implementation of load balancing can be done according to requirements, can be based on DNS resolution load balancing, can also use LVS or dedicated load balancer (such as
load balancing of Web sites
When the site is a large number of visits will be considered load balance, this is also the basic skills of each architect, its fundamental status is equivalent to the crosstalk in the said to learn to sing, Live well look at this:)
The traditional load
same RS, otherwise it is a mess. To ensure this, the LVS internally maintains a session hash table that can be found on which RS should be forwarded via some information from the client.
5. LVS Clustering
After adopting Full-nat mode, we can build the cluster of LVS, and the topological structure such as:
6. Disaster tolerance
Disaster tolerance is divided into Rs disaster tolerance and LVS disaster tolerance.
The disaster tolerance of Rs can be
In the past, running a large Web application meant running a large Web server. Because your application attracts a large number of users, you will have to add more memory and processor to your server. Today, the "big server" model is over, replaced by a large number of small servers, using a variety of load balancing t
under Windows configuration, LVS in the configuration of Linux next write.Overview: Using Nginx to build a reverse server to achieve load balancing of Web server cluster1, download nginx--windows version, (Nginx-1.6.2.zip) at the end of the blog can be downloaded, unzip2. Use the Winsw-1.8-bin (Windows Service tools). EXE tool to publish Niginx to domain mode to
Nginx Series Links:An introduction and installation of Nginx high Performance Web server seriesWww.cnblogs.com/maxtgood/p/9597596.htmlThe second command management of Nginx High Performance Web server seriesWww.cnblogs.com/maxtgood/p/9597990.htmlThree-version upgrade of Nginx high Performance Web server seriesWww.cnblogs.com/maxtgood/p/9598113.htmlNginx high-Perf
) database scheme: Master-slaveSmall and Medium business sites, MySQL database with a master one from the solution to meet business needs, and then look relatively single, but it turns out that the stability of this design is very reliable!Verified that the use of MySQL master one from the scheme for many years of the site, rarely because the database failure occurred over data loss phenomenon.Web site in the early stage, you can use the PHP program, the background of the query function of the e
greater the probability of distribution. Server 127.0.0.1:8040 weight=1;} #当前的Nginx的配置 Server { listen 8090; #监听80端口, can be changed to another port server_name localhost;############## The domain name of the current service #charset koi8-r; #access_log logs/host.access.log main; #location/{ # root html; # Index index.html index.htm; #}location/{ proxy_pass http://netitcast.com; Proxy_redirect
LVS topic: NAT and Dr Model for Web load Balancing
Objective:
in the previous article we talked about the basic concepts of LVS and the experimental principles and processes of the corresponding model, this article we mainly use lvs provide load balancing
1. Introduction to Keepalived
Keepalived is an important underlying tool that provides HA. Its initial role was to provide HA functions for ipvs and a service software that can provide vrrp health-check functions, it can be used only to provide a floating vip (vrrp virtual routing function), which can easily implement a Hot Standby High Availability function. At the same time, we can also use the LVS + Keepalived architecture based on the complete open source software to provide you with a
return to normal, VIP will still drift to lvs01, the original because keepalived configuration file state is master,LVS02 ~]# IP A1:lo: Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00inet 127.0.0.1/8 Scope host LoINET6:: 1/128 Scope HostValid_lft Forever Preferred_lft Forever2:eth0: Link/ether 00:0c:29:a5:b4:85 BRD FF:FF:FF:FF:FF:FFinet 192.168.137.130/24 BRD 192.168.137.255 Scope Global eth0inet 192.168.137.80/32 Scope Global eth0Inet6 FE80::20C:29FF:FEA5:B485/64 Scope linkValid_lft Fore
different content, proxy to a different background server, as in the example above to access the phpMyAdmin directory agent to the first server, access to the test.php agent on the second server;2) can be defined in Nginx to access the same page, balanced (of course, if the server performance can be defined by the weight of a balanced) agent to different background server. As the example above accesses the test.php page, it will be evenly represented on the server1 or Server2.In practice, the s
ObjectiveAs the amount of traffic increases, a Web server may not be able to meet the demand, which requires increasing the number of Web servers, so the problem is: how to ensure that the two server data synchronization? This article explains how to implement load balancing and data synchronization for
Many large websites use multiple server (IP) addresses to provide services for a single website to relieve stress and avoid spof. This includes using DNS round training for load balancing. But for administrators, how can they monitor these servers? The following script can help you implement it. Importsocket, urllib. parse
Many large websites use multiple serve
In Linux, LVS and ipvsadm are used for Web load balancing. If you want to have a comprehensive and macro understanding of Server Load balancer, you can see: Principles and Applications of Server Load balancer
.
I. Introduction and environment Configuration
In Linux,
can be found on which RS should be forwarded via some information from the client.
5. LVS Clustering
After adopting Full-nat mode, we can build the cluster of LVS, and the topological structure such as:
6. Disaster tolerance
Disaster tolerance is divided into Rs disaster tolerance and LVS disaster tolerance.
The disaster tolerance of Rs can be realized by the LVS regular health test, if an RS loses its heartbeat, it is considered to be offline and will not b
--------------------------------------------------------------Centos 6.6 Environment PHP http://lampol.blog.51cto.com/11662628/1851016--------------------------------------------------------------Load balancing, The English name is load Balance, which means that it is distributed across multiple operating units for execution, such as
/.*************************************************************************************************************** ***********It can also be configured as follows:Httpd/conf/httpd.conf modified as follows:Proxypass/balancer://mycluster/stickysession=jsessionid Nofailover=onBalancermember http://127.0.0.1:9080/a loadfactor=1 route=jvm1Balancermember http://127.0.0.1:10080/a loadfactor=1 route=jvm2The Tomcat/conf/server.xml are modified as followsStart Tomcat1 and Tomcat2, and then start ApacheVisi
Two Web servers implement Load Balancing + FastCGI module + MySQL implement distributed architecture Operating System: RedHat5.8 test environment preparation: three servers Server1IP: 172.16.2.1 install: apacheNFS
Two Web servers implement Load
But if the site has an average of more than 200 requests per second, then the problem is: This is already the best Web server, what should I do? The same scenario applies to the database. To solve this problem, we need to understand the principle of "load balancing".
How Web servers do
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.