Using a subset of GetHashCode() to increase AzureTable performance through partitioning
- by makerofthings7
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?