Using a subset of GetHashCode() to increase AzureTable performance through partitioning

Posted by makerofthings7 on Programmers See other posts from Programmers or by makerofthings7
Published on 2012-11-20T16:18:47Z Indexed on 2012/11/20 17:18 UTC
Read the original article Hit count: 356

Filed under:
|
|
|
|

Generally speaking, Azure Table IO performance improves as more partitions are used (with some tradeoffs in continuation tokens and batch updates I won't go into).

Since the partition key is always a string I am considering using a "natural" load balancing technique based on a subset of the GetHashCode() of the partition key, and appending this subset to the partition key itself. This will allow all direct PK/RK queries to be computed with little overhead and with ease. Batch updates may just need an intermediate to group similar PKs together prior to submission.

Question:

  • Should I use GetHashCode() to compute the partition key? Is a better function available?

  • If I use GetHashCode() does it matter which character I use for my PK?

  • Is there an abstraction for Azure Table and Blob storage that does this for me already?

© Programmers or respective owner

Related posts about c#

Related posts about .NET