Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Location
    Greece
    Posts
    1,047

    Question Load balancing Mysql servers using Haproxy

    Hello

    I just install haproxy in front of mysql cluster servers and the only working config (as it is not the same as the balancing on web servers) is this:

    Code:
    global
           log 127.0.0.1 local0
           chroot      /var/lib/haproxy
        
           pidfile     /var/run/haproxy.pid
           maxconn 4000
           user haproxy
           group haproxy
           daemon
     
    
    listen  stats   serverownip:1936
            mode            http
            log             global
    
            maxconn 10
    
            clitimeout      100s
            srvtimeout      100s
            contimeout      100s
            timeout queue   100s
    
            stats enable
            stats hide-version
            stats refresh 30s
            stats show-node
            stats auth admin:password
            stats uri  /stats
    
    listen MySQL 0.0.0.0:3306
        timeout connect 10s
        timeout client 1m
        timeout server 1m
        mode tcp
        server database1 ipofserver1:3306 check
        server database2 ipofserver2:3306 check
    But on that config is not any method of load balancing like roundrobin and i am not sure if a request fail if haproxy auto reroute the request on the next server and don't give an error on the user ?

    Can you please post your config (ONLY if you use it for mysql balancing) please or comment on my config?

    Thank you

  2. #2
    Hello,

    have used haproxy as frontend to mysql but it was not the best solution since it was not sending every query to the nodes. Especially on writes. I would use something else. Maybe mysqlproxy or some other load balancing solution.

Similar Threads

  1. Load Balancing 2 Web servers and 2 MySQL Servers
    By YYamagishi in forum Hosting Security and Technology
    Replies: 11
    Last Post: 03-30-2008, 03:46 AM
  2. HAproxy - Quick and Dirty HTTP Load balancing Tutorial on Redhat/Centos
    By Steven in forum Hosting Security and Technology Tutorials
    Replies: 0
    Last Post: 08-14-2007, 02:03 AM
  3. Replies: 5
    Last Post: 03-04-2006, 01:26 PM
  4. Replies: 5
    Last Post: 10-13-2005, 01:45 PM
  5. Replies: 4
    Last Post: 07-08-2005, 07:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •