Preface: We KnowTomcat+nginxLoad Balancing cluster,LVsLoad Balancing clusterAndHaproxyto build a cluster, these three clusters are comparedLVsthe performance is the best, but the building is complexNginxof theUpstreamThe module supports clustering, but there is not much fault checking on the nodes of the cluster, and no performanceHaproxyWell, so it should be saidHarpoxyis also very good. So then we started using haproxy to build the cluster. One, top
forwards data to the backend upstream server.
Timeout client: timeout duration of the client's inactive status
Timeout server: haproxy maintains a session with the backend server segment. When the backend server is down, haproxy waits for timeout.
Timeout-keep-alive: defines the timeout duration of the connection persistence mode.
Timeout-check: the timeout time for establishing status detection.
programs often have poor extensibility. That's why they have to be optimized so that each CPU time slice (Cycle) does more work.--Excerpt from Baidu EncyclopediaImplementation process diagram:The first step: install httpd, PHP and Haproxy, here we directly with Yum to install, here we use three virtual machines to do the test, the front-end of a
balancer software, which is implemented at the software level, so the cost is very low.
Currently, the website architecture is generally reasonable and popular: The Web Front-end uses nginx/haproxy + keepalived as the Load balancer, And the backend uses the MySQL database for master-slave and read-write separation, use the LVS + keepalived architecture. Of course, you must develop a scheme based on the specific needs of the project.Next we will talk
I. Preparation 1. prepare the server to establish the MySQLCLuster system with two nodes, and use six servers to establish Haproxy43; mysqlcluster (MySQL Cluster) system node configuration description the IP address and port of the node Haproxy server load balancer (1) centos I. preparations
1. prepare the server
Establish a MySQL CLuster system with two nodes and build a Haproxy + mysql cluster (MySQL CLu
Haproxy + mysqlcluster (MySQL cluster) Configuration
I. Preparation
1. Prepare the server
Establish a MySQL CLuster system with two nodes and build a Haproxy + mysql cluster (MySQL CLuster) system with six servers
Node configuration instructions
Node
Corresponding IP address and port
Haproxy Server Load balancer (1) centos 6.3
1.1.1
Haproxy Proxy to build a highly available Web clusterStatus code for HTTP protocol response:200:ok301: Redirect404:not found403:forbidden501:internal ErrorHAProxy:1, it's working principle is proxy agent. After the client sends the request to Haproxy, Haproxy sends the request to the Web server for the user, the Web server responds to the
Hproxy provides high availability, load balancing, and reverse proxies based on TCP and HTTP applications, especially for those web sites that are heavily loaded, which typically require session hold or seven-tier processing. Haproxy runs on the current hardware, fully supports tens of thousands of concurrent connections, and its operating mode makes it easy and secure to integrate into the architecture, while protecting your Web server from being exp
Document directory
About SSL certificates
Others
Install haproxy by the way:
Some practical problems and solutions
Recently, Stunnel is used as a transparent proxy, and haproxy is used as an SSL solution. Stunnel is added between the user and the original reverse proxy, so that the user and Stunnel can use SSL, the real Web after Stunnel does not need to
I built the Tomcat+nginx load Balancer cluster, the LVM load Balancing cluster, I'm going to get a haproxy load Balancer cluster, the three clusters I have to realize the LVS performance is really good (DR) but in the construction process is too cumbersome, Nginx is the use of upstream module cluster but the cluster node failure check function is not enough performance and LVM is a bit far away, so today to a middle person haproxy.One , build
run-d--name=consul--net=host docker.io/gliderlabs/consul-server-bootstrap-bind= 192.168.200.8Host to do consulDownload the Consul package and unzip[Email protected] ~]# wget https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_386.zip[[email protected ] ~]# unzip Consul_0.6.4_linux_386.zip[[email protected] ~]# mv consul/usr/bin/Download the consul-template package and unzip[Email protected] ~]# wget https://releases.hashicorp.com/consul-template/0.15.0/consul-template_0.15.0_linux_ 3
Web schemaDescribe the purpose of each server:1, Haproxy to achieve the back-end Web server load Balancing2, keepalived to achieve the high availability of haproxy3, Apache static page access to implement4. Dynamic page access for Aoache dynamicsWhat is keepalived?Keepalived is a routing software written in C. The main goal of this project are to provide simple and robust facilities (capability) for loadbalancing and high-availability to Li Nux system
Haproxy is a highly available, load-balanced, and TCP-and HTTP-based agent software, Haproxy is completely free, with Haproxy can quickly and reliably provide a proxy solution based on TCP and HTTP applications. Haproxy applies to those Web sites that are heavily loaded, which typically require session maintenance or s
Recently the company's IIS server is always down, their knowledge of operation and maintenance is very short, listen to some of the introduction decided to bite the bullet, set up a haproxy load to the back end of two IIS. Here's a summary of experience!First install haproxy with yum command This is very simple, say the process!
Tags: mysql cluster haproxyFirst, prepare1. Prepare the serverBuild a MySQL cluster system with 2 nodes and build haproxy+mysql cluster (MySQL cluster) system using 6 servers
node Configuration Instructions
Node
The corresponding IP and port
Haproxy Load Balancer (1) CentOS 6.3
1.1.1.11
Management node (1) CentOS 6.3
1.1.1.30
SQ
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.