Reputation: 8527
I would like to use Azure Web Role Instances for hosting few website using distributed cache (Windows Azure Caching).
What would be the better choice of size and quantity of VMs: 2 Large VMs or 4 Medium VMs.
The price and specifications are the same in both cases. I am just wondering if having more, but smaller machines is better.
Upvotes: 1
Views: 148
Reputation: 1656
This MSDN article, Real World: Considerations When Choosing a Web Role Instance Size: How small should I go?, gives some good advice. One benefit of using smaller instances is that you can shutdown one or more instances during low traffic periods. However, if you are committed to running the same number of instances continually, the larger instances (according to the article) will perform better.
Upvotes: 2
Reputation: 31651
Since you are using a cache cluster, each new VM costs you a percentage of the overall cluster RAM due to required OS resources. I would use Large VMs to maximize the available RAM resources for the cache cluster and reduce the amount of RAM taken by the OS itself.
I would also use Large VMs to reduce the network latency in scenarios where the local cache does not contain the given cache key. Since the cache is distributed there is a 50-50 chance it is in local RAM vs a remote machine's RAM in a dual-role scenario. If you have 4 Medium VM roles, network latency will go up since the cache will only have a 25% chance of a cache hit in the local RAM.
Truly though, you need to determine where the bottleneck is - cache is not the only thing to focus on. Typically you want to look at response time for each application request as a whole. This may take some real world load testing which is easy to configure with the Azure portal and deployment config.
Upvotes: 1