殿堂入りのアレ~multi-source replication を添えて~
DESCRIPTION
2013/10/25 MySQL Casual Talks Vol.5TRANSCRIPT
![Page 1: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/1.jpg)
殿堂入りのアレ~ Multi-Source
Replication を添えて~
2013/10/25 MySQL Casual Talks vol.5 do_aki
![Page 2: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/2.jpg)
@do_aki
http://do-aki.net/
![Page 3: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/3.jpg)
I PHP
![Page 4: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/4.jpg)
マスタ n対スレーブ1レプリケーション
いつものおさらい
![Page 5: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/5.jpg)
マスタ分割の弊害
MasterA
SlaveA1
SlaveA2
SlaveB1
MasterB
SlaveB2
JOIN 不可
![Page 6: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/6.jpg)
マスタ分割
MasterA
SlaveA1
SlaveA2
SlaveB1
MasterB
SlaveB2
JOIN 不可マスタ分割で
も
JOIN がし
た
い!
![Page 7: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/7.jpg)
カジュアルなマスタ併合
MasterA
SlaveA1
SlaveA2
SlaveB1
MasterB
SlaveB2
SlaveA+B
![Page 8: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/8.jpg)
これを実現するためのレプリケーション
MasterA
SlaveA+B
MasterB
![Page 9: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/9.jpg)
n:1 レプリケーション
MasterA
SlaveA+B
MasterB
CHANGE MATER TO でマスタを定期切替
![Page 10: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/10.jpg)
n:1 レプリケーション
MasterA
SlaveA+B
MasterB
CHANGE MATER TO でマスタを定期切替
![Page 11: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/11.jpg)
switch_master.plhttps://github.com/do-aki/SwitchMaster
MasterA
SlaveA+B
MasterB
http://www.slideshare.net/do_aki/20110809-my-sql-casual-talks-vol2
動作の詳細は、 Vol.2のスライドを参照
![Page 12: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/12.jpg)
で
![Page 13: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/13.jpg)
multi-sourceReplication
について
![Page 14: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/14.jpg)
http://www.mysqlperformanceblog.com/2013/10/02/mysql-5-7-multi-source-replication/
![Page 15: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/15.jpg)
labs.mysql
.com
![Page 16: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/16.jpg)
multi-source Replication
http://www.mysqlperformanceblog.com/2013/10/02/mysql-5-7-multi-source-replication/ より引用
並列(同時 )接続
![Page 17: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/17.jpg)
multi-source Replication
channel 1
channel 2
channel 3
channel 4
CHANGE MASTER TO … FOR CHANNEL “channel name”;
START SLAVE FOR CHANNEL “channel name”;
![Page 18: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/18.jpg)
tweet
しかし……
![Page 19: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/19.jpg)
2011/04/13
Round-Robin Multi-Source in Pure SQL
http://mysqlmusings.blogspot.jp/2011/04/round-robin-multi-source-in-pure-sql.html
![Page 20: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/20.jpg)
2006/12/21
![Page 21: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/21.jpg)
http://www.fromdual.com/sites/default/files/mm-single-slave-repl.pdf
![Page 22: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/22.jpg)
MYSQL MULTI-MASTER – SINGLE-SLAVE – REPLICATION 2
http://www.fromdual.com/mysql-multi-master-single-slave より引用
MyISAM Active- Active
Clustering
![Page 23: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/23.jpg)
まとめ
![Page 24: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/24.jpg)
• あいかわらず安定稼働中
• multi-source Replication よさそう!
• MySQL で変態的なこと考える人多いね
![Page 25: 殿堂入りのアレ~Multi-Source Replication を添えて~](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b723654a7959b8098b4706/html5/thumbnails/25.jpg)
ありがとうございました