Haproxy Note Six: Load Balancer configuration example for MySQL service

Source: Internet
Author: User
Tags syslog haproxy

#---------------------------------------------------------------------# Global settings#---------------------------------------------------------------------Global # to has these messages end upinch/var/log/Haproxy.log You'll # need to: # #1) Configure Syslog to accept network log events. This is Done# by adding the'- R'Option to the Syslogd_optionsinch    #    /etc/sysconfig/Syslog # #2) Configure Local2 events to go to the/var/log/Haproxy.log #file. A line like the following can is added to #/etc/sysconfig/syslog # # Local2.*/var/log/Haproxy.log # Log127.0.0.1Local2chroot/var/lib/Haproxy Pidfile/var/run/haproxy.pid Maxconn4000User haproxy Group Haproxy daemon defaults mode TCP log Global option Httplog option Dontlognull retries3Timeout http-Request 10s Timeout queue 1m timeout Connect 10s timeout client 1m timeout s Erver 1m Timeout http-keep-Alive 10s Timeout Check 10s maxconn -Listen stats mode http bind0.0.0.0: thestats Enable stats hide-version stats URI/haproxyadmin?Stats Stats Realm haproxy\ Statistics stats auth admin:admin stats adminifTRUE frontend MySQL bind*:3306mode TCP log global default_backend mysqlservers backend mysqlservers balance leastconn server Dbsrv1 192.168.10.11:3306Check Port3306Intval2Rise1Fall2Maxconn -Server Dbsrv2192.168.10.12:3306Check Port3306Intval2Rise1Fall2Maxconn -

Haproxy Note Six: Load Balancer configuration example for MySQL service

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.