I have to shard a mysql database. I want to start with 12 shards on 2 machines. What is the best w

Posted by Tim on Server Fault See other posts from Server Fault or by Tim
Published on 2010-04-07T15:48:55Z Indexed on 2010/04/07 15:53 UTC
Read the original article Hit count: 271

Filed under:
|
|

All tables are InnoDb. I would rather not use mysqldump, because the shard sizes will be about 200 GB (about 700 million rows), and that will take too long.

I was hoping to just stop mysql for an hour, copy the data files to a new machine, and start back up. But you can't do this with InnoDb, as some data is in the shared tablespace. Even if I have the innodb_file_per_table option set.

This is not a website, but a custom application, used by tens of thousands right now, so uptime and performance are important. I suppose I could add logic into my server application to allow for gradual rebalancing / moving of a shard.

Does anyone have a better idea?

© Server Fault or respective owner

Related posts about mysql

Related posts about sharding