Browse Source
Originally I put the first two digits of the object SHA-1 into the start of a row key to try and spread the load of objects around a DHT service. Unfortunately this tends to not work as well as I had hoped. Servers reading a repository need to contact every node in a DHT cluster if the cluster tries to evenly distribute the object rows. This is a lot of connections, especially if the cluster has many backend storage servers. If the library has an open connection limit (possibly due to JVM file descriptor limitations) it may need to open and close a lot of connections to access a repository, rather than being able to reuse the same connection to a handful of backend servers. This results in a lot of connection thrashing for some DHT type databases, and is inefficient. Some DHTs are able to operate even if part of the database space is currently unavailable. For example, a DHT service might assign some section of the key space to a node, and then fail that section over to another node when the primary is noticed as being offline. During that failover period that section of the key space is not available, but other sections hosted by other backends are still ready for service. Spreading keys all over the cluster makes it likely that any single backend being temporarily down means the entire cluster is down, rather than only some. This is a massive schema change, but it should improve relability and performance for any DHT system. Change-Id: I6b65bfb4c14b6f7bd323c2bd0638b49d429245be Signed-off-by: Shawn O. Pearce <spearce@spearce.org>stable-1.1
Shawn O. Pearce
14 years ago
4 changed files with 20 additions and 27 deletions
Loading…
Reference in new issue