在分布式架构中,随着时间推移,各分片上数据量及访问量越来越大,服务器容量和性能达到瓶颈,数据扩容在DBProxy不停机的前提下,将高负载服务器上的部分分片完整的迁移到低负载的服务器上,透明的完成分片数据迁移和配置切换。
原理示意图2.1 部署migration服务




cd /usr/bin
ln -s usr/bin/xtrabackup innobackupex





清除完成后,本次迁移扩容操作就完成了。
3.1 迁移过程中会阻止源数据库和目标数据库主备自动切换,迁移结束后恢复可切换状态
140505 16:05:59 InnoDB: Using Linux native AIO
140505 16:05:59 InnoDB: Warning: io_setup() failed with
EAGAIN. Will make 5 attempts before giving up.InnoDB:
Warning: io_setup() attempt 1 failed.InnoDB: Warning:
io_setup() attempt 2 failed.InnoDB: Warning: io_setup()
attempt 3 failed.InnoDB: Warning: io_setup() attempt 4
failed.InnoDB: Warning: io_setup() attempt 5 failed.
140505 16:06:02 InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
SZDB:~ # cat /proc/sys/fs/aio-max-nr65536 #64k个
SZDB:~ # vi /etc/sysctl.conf
fs.aio-max-nr=262144 #调整为256k个
SZDB:~ # sysctl -p

本文作者:饶茂林(上海新炬中北团队)
本文来源:“IT那活儿”公众号

文章转载自IT那活儿,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




