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 four-layer load Balancing SetupHost Planning:Server 192.168.1.148 provides haproxy servicesBackstage Web1 192.168.1.150WEB2 192.168.1.136Installing with the source packageExtract:TAR-
Install Nginx (as HTTP server) and Haproxy (reverse proxy) in the test environment, and configure Haproxy log output to/var/log/haproxy.log, take note.It should be explained that this is only a basic installation, configuration method, and does not involve specific usage in a production environment.First, install Nginx
the network.Start now, using the Ubuntu64-bit operating system1. Install Haproxy on Ubuntu:sudo apt-get install Haproxy2. After installation, it is configured to boot from:sudo vim/etc/default/haproxyChange enable=0 to enable=1 save exit3. Configure Haproxy:sudo vim/etc/haproxy/haproxy.cfg, modify the contents of the
. installation and configuration
1. Topology
Note: 1. Two proxy servers provide data externally through VIP
2. Both proxy servers can proxy backend servers
3. For the convenience of testing, the backend server provides a static page
2. ip planning
Functions
IP address
Install software
VIP
192.168.1.99
Reverse Proxy 1
192.168.1.201
Keepalived, haproxy
R
integration.Zabbix Here we are using the Yum method to install, after the installation is complete, Apache listens to the 8099 port. The form of access is as follows:http://zabbix.ilanni.com:8099/zabbix/It is now required to use the 80 port directly to access the Zabbix,haproxy specific configuration as follows:GlobalLog 127.0.0.1 Local0Log 127.0.0.1 Local1 NoticeMaxconn 4096UID 188GID 188DaemonDefaultsLog
it implements all of these tasks on the client side (User-space) with better resource and time management. The disadvantage of this model is that, on multicore systems, these programs often have poor extensibility. That's why they have to be optimized so that each CPU time slice (Cycle) does more work.--from Baidu EncyclopediaImplementation process diagram:650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/26/0B/wKioL1Npn2qDdiOwAAEUH5H3E2Y175.jpg "title=" Haproxy.jpg "alt=" Wkiol1npn2qd
it implements all of these tasks on the client side (User-space) with better resource and time management. The disadvantage of this model is that, on multicore systems, these programs often have poor extensibility. That's why they have to be optimized so that each CPU time slice (Cycle) does more work.--from Baidu EncyclopediaImplementation process diagram:The first step: install httpd, PHP and Haproxy, he
First download Haproxy package: Source Installation
wget http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.13.tar.gz
wget http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.24.tar.gz
Installation: Tar zxvf haproxy-1.4.13.tar.gz
M
, these programs often have poor extensibility. That's why they have to be optimized so that each CPU time slice (Cycle) does more work. Second, installation Haproxy
Wget http://www.haproxy.org/download/1.5/src/haproxy-1.5.14.tar.gz (outside the wall).Tar zxvf haproxy-1.5.14.tar.gzUNAME-A # view Linux kernel versionMake Target=linux26 Prefix=/usr/local/haproxyMak
Project needs to build RABBITMQ high-availability cluster, recently in the learning and building process, recorded here can communicate with everyone (here is just a record of their own building process after learning, many of the principles of things not in detail).
Build the Environment
CentOS7 64-bit
RabbitMQ 3.6.2
Keepalived 1.2.21
Host: 192.168.0.1 192.168.0.2 192.168.0.3 install RABBITMQ service on
/allimg/140213/0152325119-0.jpg" alt = "wKiom1L5zMSQ035wAAFtu7JUbso057.jpg"/>
Start to explain the Configuration:
Install required components, such as keepalived and haproxy.
yum install gcc kernel-headers kernel-develyum install keepalivedyum install
Prepare before deployment:Iptables and SELinux are not configured, turn offMount system image as local Yum source, modify Yum fileSource Package Preparation nginx.1.6.0.tar.gz haproxy-1.4.24.tar.gzExperimental Environment Description:Two nginx 192.168.100.110 and192.168.100.120 respectivelya haproxy to 192.168.100.160 1, respectively, on the three and three to build nginxYum-y
Tags: redis mysql cluster load balancerThis article focuses on the Haproxy+mysql load balancing, after the completion of the building with the previous REDIS+SSM to integrate(Note: Here are two MySQL databases, installed two virtual machines, have successfully implemented primary master replication, if necessary, please check my other blog: http://www.cnblogs.com/cuijiale/p/8039421.html)1, first download the latest
HAProxy: Implements an event-driven, single-process model that supports tens of thousands of of concurrent connections to provide highly available, load-balanced, and proxy service solutions for TCP and HTTP applications, especially for high-load Web sites that require a durable connection or a 7-tier processing mechanismProxy (HTTP):Forward Proxy:Reverse proxy:Agent role: Web caching (acceleration), reverse proxy, content routing (forwarding requests
: This article mainly introduces (summary) the advantages and disadvantages of NginxLVSHAProxy server load balancer software. For more information about PHP tutorials, see. PS: Nginx/LVS/HAProxy is currently the most widely used three load balancing software. I have implemented these software in multiple projects. I have referenced some materials and combined some of my experience in using it, to sum up.
Generally, server load balancer uses different
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.