LVS + Keepalived for high-availability Load Balancing I. Principle 1. Summary if you divide TCP/IP into five layers, Keepalived is similar ~ Software with layer-5 switching mechanism, with 3 ~ The layer-5 switching function is mainly used to detect the status of the web server. If a web server fails, Keepalived will detect and remove it from the system, when the web server is working normally, Keepalived au
address as follows:Nginx Download:http://nginx.net/Version downloaded for this test:nginx/windows-0.8.22Download Unzip to C:, change the directory name to NginxWell, below into practice:First:On the local (172.10.1.97) server, IIS creates a Web site that uses a port of 808, such as:IIS Web site binding settings diagramSecond:In remote 172.10.1.236 IIS, create a Web site that uses a port of 80, such as:Remote IIS Binding settings diagramThird:Well, the above has been set up two server IIS, the f
address as follows:Nginx Download:http://nginx.net/Version downloaded for this test:nginx/windows-0.8.22Download Unzip to C:, change the directory name to NginxWell, below into practice:First:On the local (172.10.1.97) server, IIS creates a Web site that uses a port of 808, such as:IIS Web site binding settings diagramSecond:In remote 172.10.1.236 IIS, create a Web site that uses a port of 80, such as:Remote IIS Binding settings diagramThird:Well, the above has been set up two server IIS, the f
automatically take over the work of the main server, and timely switch to the past to achieve uninterrupted service to users. High-performance Computing (HP): The use of the resources of each computer in the cluster to achieve parallel processing of complex operations, often used in the field of scientific computing, such as genetic analysis, chemical analysis and so on. Load
4
5
6
7
8
9
10
Show slave status represents a clustering strategy that applies only in the context of a master-slave, when the master is down, from being able to act as primary and Balance Property Balance= "0", does not open the read and write separation mechanism, all read operations are sent to the currently available WritehostBalance= "1", all readhost and stand by writehost participate in load
Project Environment:
Both Windows Server 2008 are dual network adapters
IP Address
192.168.19.100 (extranet 1) 99.99.99.99 (intranet 1 dedicated)
192.168.19.101 (extranet 2) 99.99.99.100 (intranet 2 dedicated)
Where 192.168.19.100 is primary DNS 101 is backup DNS
Virtual IP Address 192.168.19.125
Ideas:
First, load Balancing Services (NLB) are installed on the w2k08, and IIS services must be install
port.Download Nginx's address as follows:Nginx Download: http://nginx.net/Version downloaded for this test: nginx/windows-0.8.22
Download Unzip to C:, change the directory name to Nginx
Well, below into practice:
First:
On the local (172.10.1.97) server, IIS creates a Web site that uses a port of 808, such as:
Second:
In remote 172.10.1.236 IIS, create a Web site that uses a port of 80, such as:
Third:
Well, the above has been set up two server IIS, the following configuration Nginx software to
port.Download Nginx's address is as follows:Nginx Download:http://nginx.net/Download of the version used in this test:nginx/windows-0.8.22
Download extract to C:, change directory name to Nginx
OK, here goes the practice:
First:
In the local (172.10.1.97) server, IIS creates a Web site using a port of 808, as shown below:
IIS Web site bindings settings diagram
Second:
Create a Web site in remote 172.10.1.236 IIS using a port of 80, as shown below:
Remote IIS Binding settings diagram
already installed.???Nginx Load Balancer ConfigurationDownload NginxAddress: HTTP://PAN.BAIDU.COM/S/1PJGB2AF?InstallationUnzip to local free directory: Edit nginx.conf File:in the http{} the contents of the following red boxes are added:?Starting and shutting down Nginx server?Test validation
Installing nginx verification Input Installation Nginx Server's IP and listening ports: if any of the following Nginx Success! ?
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
process dies and immediately switches the standby server, the switch time does not feel.Load Balancing:The upstream default is a poll-based load balancing method, in which each request is assigned to a different backend server in chronological order, and can be automatically rejected if the backend server is down. Another way is Ip_hash: Each request is allocate
Nginx has been used for a long time, but it has only recently been done using Nginx for load balancing and high availability.General idea: According to the characteristics of keepalived, through a virtual IP to achieve a master-slave server switchover, if one server down, you can automatically switch to another backup server, so as not to affect user access.Here
First, Load balancer server: Lvs:lvs is a shorthand for Linux virtual server, which means that Linux is a virtualized server cluster system. Founded in May 1998 by Dr. Zhangwensong, this project is one of the earliest free software projects in China. Nginx:nginx ("Engine X") is a high-performance HTTP and reverse proxy server and a IMAP/POP3/SMTP server. Nginx was developed by Igor Sysoev for the second rambler.ru site of Russian traffic, and the firs
Access to the Enterprise network server has increased dramatically, a server is difficult to meet the user's access needs, then how to ensure that the user's normal access? There are many solutions, such as using Windows 2000 or Windows Server 2003 to provide Network Load balancing services. However, the settings for this service are very complex. And it is a simple method to realize Network
the above information to the virtual adapter (bonding.[Root @ rhas-13 network-scripts] # cat ifcfg-eth0DEVICE = eth0ONBOOT = yesBOOTPROTO = dhcp[Root @ rhas-13 network-scripts] # cat ifcfg-eth1DEVICE = eth0ONBOOT = yesBOOTPROTO = dhcp
3 # vi/etc/modules. confEdit the/etc/modules. conf file and add the following line to enable the system to load the bonding module at startup. The external virtual network interface device is bond0. Add the following t
) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/83/F7/wKioL1eCJSugAb1PAADf3v1XS6E748.png "style=" float: none; "title=" 5.png "alt=" Wkiol1ecjsugab1paadf3v1xs6e748.png "/>4, the client uses LoadRunner to hit the stream test, in the F5 view Real-time connection number, the connection number is about650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/83/F9/wKiom1eCJTqDsC22AABfKR6l5YI395.png-wh_500x0-wm_3 -wmp_4-s_4167787041.png "title=" 7.png "alt=" Wkiom1ecjtqdsc22aabfkr6l5yi395.pn
script to set up a firewall, you need to add the following rules
Iptables-a output-o eth0-d 224.0.0.18-j accept iptables-a output-o eth0-s 224.0.0.18-j Accept Iptables-a input-i eth0-d 224.0.0.18-j Accept Iptables-a input-i eth0-s 224.0.0.18-j Accept
5. Summary
Keepalived the dual-machine hot standby via virtual routing, which has some advantages over other schemes.
Because it is a fixed master-slave hot standby, this scheme is more suitable for two interoperability s
The following is a summary of the commonly used highly available complex balanced architecture patterns.
1. Client switching.
The client configures multiple server addresses. If a server fails to access or uses an exception, the client switches to another server.
Advantages: Simple, efficient, can detect service availability at the business level
Disadvantage: Need to configure in advance.
Mysql connect so do load balance and failed over. Multiple
into Tomcat1-3. In order to differentiate between each Tomcat server, index.jsp is slightly different.
Web. xml: Added
index.jsp
At this point, all configurations and deployments are complete. 4. Start Nginx and Tomcat service (1) Start nginx Service open command line cmd, switch to nginx installation directory, run start Nginx start service.
Note: The command to stop the Nginx service is nginx-s stop
(2) Start TOMCAT1, TOMCAT2 and TOMCAT3
Article Title: RouterOS dual-line load balancing. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
How to install routeros-ros dual-Line Load Balancing
Experiences in installing rout
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.