Partitioning Data by Hash function
<p>I need to split data evenly across n nodes in a distributed cache.</p>

<p>The following code will take a cache key and determine which Node to use:</p>

<pre><code>public static int GetNodeIDByCacheKey(string key)
{
    return Math.Abs(key.GetHashCode()) % TotalNumberOfNodes();
}
</code></pre>

<p>Unfortunatly the code isn't reliable across different machine instances.
In testing it seems it will sometimes return a different Node for the same key.</p>

<p>Any thoughts or ideas on getting something to work better?</p>
