Managing worker roles
Azure is an elastic system, meaning resources can fairly easily scale up or shrink based on demand for those resources. Because the costs of Azure are based on resource utilization, there is a balance between cost and performance for our Azure applications; hence, managing roles is an essential part of a well-run Azure application.
So how do we know when to scale up a worker role? The answer depends largely on the overall system architecture. If we're experiencing high traffic, experiencing significant lags in processing time, and a queue is filling faster than it can be processed, it's probably time to increase the worker roles.
On the other hand, our system design may include a rate-limiting step to maintain system resources downstream. Or, our application may employ the singleton pattern to avoid data concurrency issues. In these cases, we'll have to look at other mechanisms to increase performance under high loads.
The initial number of instances for a particular...