4

现在,我正在处理大量需要实时提供的数据(相信我),以便快速读取和写入客户。我们使用的后端存储系统是 Oracle,但我们想用更精简的系统替换我们的大型、强大的机器。

由于各种原因,我们不能使用 Cassandra,并且我们正在测试(但我很害怕)MongoDB(它真的很年轻,并且缺少一些关键功能),所以我正在考虑对一堆 MySQL 实例进行分片。

有没有一个好的系统来管理这个,还是我必须自己动手?我找到了一些项目,但我不清楚它们是否支持动态添加/删除碎片。

4

3 回答 3

6

You can definitely implement database sharding with MySQL very effectively. If your sharding scheme is simple it can be done in your application layer, but if its more complex you may want to use a tool. A lot of the options are described on our site here, as well as the advanced options we support.

You can learn more about the options here:

http://www.dbshards.com/articles/database-sharding-whitepapers/

Also its important to consider the entire lifecycle for a sharded environment, including failover, active-active replication, backups, restores, and re-sharding as you mentioned above.

FYI we have customers reading and writing very high volumes with 1000s of concurrent users in cloud environments (with slow I/O), and even faster in data center environments. Sharding definitely can be incredibly effective, with writes scaling linearly and reads often better than linear (because more data is cached in the database).

于 2010-10-06T17:21:14.987 回答
0

好问题!我必须说我同意@cisaacson 的观点,当你的方案变得有点复杂时,你可能想要研究某种数据库管理。您可以自己进行分片,但据我所知,您正在处理一个复杂的场景。我最近为一个可能的项目研究了这个问题,这就是我进入分片的方式(并找到了你的帖子)。考虑到分片可能有点挑战......所以在计划这样的迁移时,您可能想要考虑分区,这有时可能是一个更简单的解决方案(这里是分区 / mysql 分片维基百科的基本思想如果需要的话)。我知道的一些挑战:如何复制脚本,如何将对象发布到所有分片?版本控制呢?这甚至没有考虑到一些明显的问题,比如访问数据所需的内存量、真正会给从机带来负担的写入量等等。看到你前段时间写的,我很好奇你最终决定做什么:)

于 2012-04-25T14:06:13.303 回答
0

Sharding-JDBC是用于分片数据库和表的 JDBC 驱动程序。也许你可以尝试使用它。

于 2016-07-13T02:45:32.847 回答