tcp 0 0 192.168.4.30:3306 0.0.0.0:* LISTEN 16119/mysql-proxy
tcp 0 0 192.168.4.30:60975 192.168.4.10:3306 ESTABLISHED 16119/mysql-proxy
tcp 0 0 192.168.4.30:60974 192.168.4.10:3306 ESTABLISHED 16119/mysql-proxy
tcp 0 0 192.168.4.30:60977 192.168.4.10:3306 ESTABLISHED 16119/mysql-proxy
tcp 0 0 192.168.4.30:60978 192.168.4.10:3306 ESTABLISHED 16119/mysql-proxy
tcp 0 0 192.168.4.30:60976 192.168.4.10:3306 ESTABLISHED 16119/mysql-proxy
在Master上可看到来自Slave和Proxy代理的网络连接:
[root@master mysql]# netstat -anpt | grep mysql
tcp 0 0 :::3306 :::* LISTEN 3788/mysqld
tcp 0 0 ::ffff:192.168.4.10:3306 ::ffff:192.168.4.30:60974 ESTABLISHED 3788/mysqld
tcp 0 0 ::ffff:192.168.4.10:3306 ::ffff:192.168.4.30:60978 ESTABLISHED 3788/mysqld
tcp 0 0 ::ffff:192.168.4.10:3306 ::ffff:192.168.4.30:60975 ESTABLISHED 3788/mysqld
tcp 0 0 ::ffff:192.168.4.10:3306 ::ffff:192.168.4.30:60977 ESTABLISHED 3788/mysqld
tcp 0 0 ::ffff:192.168.4.10:3306 ::ffff:192.168.4.20:33555 ESTABLISHED 3788/mysqld
tcp 0 0 ::ffff:192.168.4.10:3306 ::ffff:192.168.4.30:60976 ESTABLISHED 3788/mysqld
并发访问量没超过指定的阀值,不区分读写操作,读写都交给负责读的服务器,一旦区分,以后都区分,直到连接数为0。