MySQL 上 sharding 的方案

Percona 的人剛好針對 database sharding 的事情整理了一篇文章,專門講 SaaS 服務時對 sharding 的規劃:「MySQL Sharding Models for SaaS Applications」。

我主要是看這段:

When sharding today, you have a choice of rolling your own system from scratch, using comprehensive sharding platform such as Vitess or using a proxy solution to assist you with sharding. For proxy solutions, MySQL Router is the official solution. But in reality, third party solutions such as open source ProxySQL, commercial ScaleArc and semi-commercial (BSL) MariaDB MaxScale are widely used. Keep in mind, however, that traffic routing is only one of the problems that exist in large scale sharding implementations.

也就是說,除了在 application 上自己實作外,目前能用的方案 (堪用的方案) 大概就這些了,而且這些方案主要是解 routing 問題,對於跨 database server 的 join 都還是要自己小心實作。

後面提到的 sharding model 也是個蠻重要的主題,切割的方法與使用的方法有關,切的好效能就會好。

另外文章沒有提到要怎麼 balancing (甚至是 auto-balancing),這點應該也是比較需要注意的地方...

This entry was posted in Computer, Database, MariaDB, Murmuring, MySQL, Network, Software and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *