mysql master ha_HAproxy与MySQL Master-Master复制速度极慢

我有两个处于多主模式的

MySQL服务器,带有HAproxy机器,用于简单的负载平衡/冗余.当我直接连接到其中一个服务器并尝试更新大约100,000个条目时,它将在大约半分钟内完成包括复制.通过代理连接时,通常需要超过三分钟.有这种类型的延迟是正常的吗?我的代理配置是否有问题(包含在下面)?这让我感到非常沮丧,因为我认为代理会进行某种负载平衡,或者至少几乎没有开销.

#---------------------------------------------------------------------

# Example configuration for a possible web application. See the

# full configuration options online.

#

# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt

#

#---------------------------------------------------------------------

#---------------------------------------------------------------------

# Global settings

#---------------------------------------------------------------------

global

# to have these messages end up in /var/log/haproxy.log you will

# need to:

#

# 1) configure syslog to accept network log events. This is done

# by adding the '-r' option to the SYSLOGD_OPTIONS in

# /etc/sysconfig/syslog

#

# 2) configure local2 events to go to the /var/log/haproxy.log

# file. A line like the following can be added to

# /etc/sysconfig/syslog

#

# local2.* /var/log/haproxy.log

#

log 127.0.0.1 local2

# chroot /var/lib/haproxy

# pidfile /var/run/haproxy.pid

maxconn 4096

user haproxy

group haproxy

daemon

#debug

#quiet

# turn on stats unix socket

stats socket /var/lib/haproxy/stats

#---------------------------------------------------------------------

# common defaults that all the 'listen' and 'backend' sections will

# use if not designated in their block

#---------------------------------------------------------------------

defaults

mode tcp

log global

#option tcplog

option dontlognull

option tcp-smart-accept

option tcp-smart-connect

#option http-server-close

#option forwardfor except 127.0.0.0/8

#option redispatch

retries 3

#timeout http-request 10s

#timeout queue 1m

timeout connect 400

timeout client 500

timeout server 300

#timeout http-keep-alive 10s

#timeout check 10s

maxconn 2000

listen mysql-cluster 0.0.0.0:3306

mode tcp

balance roundrobin

option tcpka

option httpchk

server db01 192.168.15.118:3306 weight 1 inter 1s rise 1 fall 1

server db02 192.168.15.119:3306 weight 1 inter 1s rise 1 fall 1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值