Implementing security, load balancing, high availability, and anti-collocation rules in a virtual infrastructure
When to use high availability and load balancing in the cloud
In this article, we look at the most common use cases for setting up an environment with high availability (HA) and
LVS (DR) + ldirectord for Load BalancingWaynewu 2009-10-28MSN: waynewush@yahoo.com.cn Email: waynewush@gmail.comI. Environment IntroductionTest the apache load balancing on two machines. A total of three machines are used.Dispatcher: 192.168.1.238Vip1: 192.168.1.230Realip: 192.168.1.235Readip: 192.168.1.236System: RHEL 5.3Ii. installation and configuration proces
Haproxy provides high availability, load balancing, and proxies based on TCP and HTTP applications, supporting virtual hosting, which is a free, fast, and reliable solution. Haproxy is especially useful for Web sites that are heavily loaded, and often require session-hold or seven-tier processing. The haproxy runs on the current hardware and can support tens of thousands of concurrent connections. and its o
In previous experiments, manual configuration was used to synchronize data between two mysql database servers. mysql-cluster is used to simplify the configuration process and expand a large number of nodes with ease, for more information about mysql-cluster, see the official mysql website ?? Long? P plan: LD1 (Server Load balancer): 192
In previous experiments, manual configuration was used to synchronize data between two mysql database servers. mysql
the deployment on two RS:first set up the gateway: Vim/etc/sysconfig/network-scripts/ifcfg-eth0Change the inside of the gateway to our Dir's intranet IP address, namely: 192.168.109.136 (two sets of Rs all have to be set)then start up the 80 ports of the two RS servers: for example,/etc/init.d/nginx startWhether the test can parse properly: curl localhost(6) Pay attention to one important step: three servers before the test must be shut down the firewall
Although LVS implements load balancing, it cannot solve a serious problem. When a RealServer is on the machine, it cannot direct subsequent requests allocated to the server to other surviving servers.
$ Sudo apt-get install ipvsadm keepalivedYou can directly modify keepalived. conf without configuring ipvsadm.
$ Sudo vim/etc/keepalived. conf
Global_defs {Router_id LVS_DEVEL}
Vrrp_instance VI_1 {State MASTER
script must be executed on both realservers.5. Use keepalvied to achieve load balancing and high availability
Vim/etc/keepalived. conf
! Configuration file for keepalivedGlobal_defs {Notification_email {[Email protected]}Notification_email_from [email protected]Smtp_server 127.0.0.1Router_id lvs_devel}Vrrp_instance vi_1 {State master # change master to backup on the backup serverInterface eth0Virtual_route
The principle of using nginx to complete this task is roughly the same, but nginx can only perform load balancing on http and mail, which is quite limited, but it supports regular expressions well! The following describes the experiment:
[Lab environment]Nginx keepalived master: 192.168.56.120nginx keepalived slave: 192.168.56.121VIP: 192.168.56.130Web1: 192.168.56.113
Web2: 192.168.56.114
[Experiment topo
Tags: outer netstat bind stat Code load Blog backend service textHttp://www.cnblogs.com/tae44/p/4717334.html Experimental system: CentOS 6.6_x86_64 (2.6.32-504.30.3.el6.x86_64) Lab Prerequisites: Firewall and SELinux are off The experiment shows that there are 4 hosts in this experiment, such as the topology of IP assignment Experimental software: keepalived-1.2.19 haproxy-1.5.14 mariadb-10.0.20 : Http://pa
LVS-NAT LVS-DR model of Load Balancing
LVS is short for Linux Virtual Server. It is a Virtual Server cluster system that can define one or more backend servers. Worker s in the INPUT kernel.
LVS Scheduling Methods: 10Static Method: only scheduling based on the algorithm itselfRr: Round RobinWrr: Weighted RR Weight Round RobinSh: source hashing supports session binding Based on ip address anti-balancingDh: d
Topology description:
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'border =" 0 "alt =" "src =" http://img1.51cto.com/attachment/201012/143538619.gif "/>
Network Description:Four public network lines are connected at the network egress. For example, two egress firewalls are used as HA and the egress address of the firewall is the address of CERNET. That is, VLAN should be enabled for the
/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s4.51cto.com/wyfs02/m01/8c/08/wkiom1hfelzx1wgraaawcrwo834711.png-wh_500x0-wm_3-wmp_4-s_4110980461.png "title = "999.png" alt= "Wkiom1hfelzx1wgraaawcrwo834711.png-wh_50"/>So first put aside these questions do not say, first of all, say the principle, nginx reverse proxy, the client is not aware of the external network server exists, that is, he just follow the DNS server resolution,
:${catalina_home_ "${i}"}/bin/bootstrap.jarExport Catalina_base_ "${i}" Catalina_home_ "${i}"EofDoneCRM dz JZ TB WM xyg YG YJ LCB GW These are the names in the project, you can also name them without having to worry about him.Next, configure the ports for each tomcat. I'll upload the auto-replace script later.Enter the Conf directory for each Tomcat side, cd/usr/local/tomcat/the project name/confVim Server.xmlModified 3:1) 2) connectiontimeout= "20000" redirectport= "8443"/> Port Port number3)
card)Restart the HTTPD service:4. Test LVS:Because the weights set are the same, they are polled for access.Thinking about a question, what if the two sites require the same content to be implemented?There are many scenarios where you can use NFS mount, rsync sync, etc.You can also set the server after the first visit to access this URL, the same server is responsible for responding, so that you have to log on to a site a bit of refresh, causing the problem is not logged in.Use the external net
Nginx load balancing, reverse proxy, and then from the firewall to do forwarding, error, with the external network ip+ port access, the results of CSS style and port are lost!!!!! Intranet ip+ port access, normal!Solution: Use Chrome's Network tab to analyze the project's path and port! Kill the useless in the config file!Pro-Test and change the configuration fil
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.