MySQL sharding approaches?

后端 未结 6 1363
Happy的楠姐
Happy的楠姐 2020-11-28 00:56

What is the best approach for Sharding MySQL tables. The approaches I can think of are :

  1. Application Level sharding?
  2. Sharding at MySQL proxy layer?
6条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 01:07

    Application level of course.

    Best approach I've ever red I've found in this book

    High Performance MySQL http://www.amazon.com/High-Performance-MySQL-Jeremy-Zawodny/dp/0596003064

    Short description: you could split your data in many parts and store ~50 part on each server. It will help you to avoid the second biggest problem of sharding - rebalancing. Just move some of them to the new server and everything will be fine :)

    I strongly recommend you to buy it and read "mysql scaling" part.

提交回复
热议问题