News for hackers. Stuff that matters.
Re:So, that was a bummer by jrockway on Tuesday October 05, 2010 @10:41PM (#1762486)
Sounds like a good system. I've noticed that people tend to do things like shard based on even/odd, and then they realize that they need three databases.

I've never had either problem though... but if I ever need to shard I plan on doing it based on object ID. Then one request can be handled by multiple databases, "for free", increasing both throughput and response time.

Re:So, that was a bummer by fizx on Wednesday October 06, 2010 @12:23AM (#1762701)
Even/odd isn't the end of the world, but you would then be best jumping to mod 4.
Re:So, that was a bummer by moe on Wednesday October 06, 2010 @02:19AM (#1762945)
Actually for anonymous sharding (without a central index) a consistent hash is about the closest you can get to ideal distribution and flexibility. I haven't looked but I presume that's what mongo uses under the hood for their auto-sharding, too.