Compartilhar via


Azure Skittles Part 5

Last time, we got our Worker Role pulling from our Queue. Now, let’s take a look at debugging and some of the scale-out options.

Debugging

You can add a breakpoint as normal in Visual Studio and see the Queue Messages build up in the database (a little bit since I don’t handle the timeouts).

Adding More Worker Roles

You will note that as we run, requests get enqueued more quickly than they get processed. But, what is slow? Our Web Role or our Worker Role? Let’s add some more Worker Roles and find out. This is very easy to do. Let’s start by adding two more Worker Roles to process the queue. In your Solution, right click on WorkerRole1 in the Roles Folder and choose Properties. We will change the instance count to 3 and run again.

Now you will see that we have 3 Worker Roles running and pulling things off the Queue. With one thread driving our service, we start to see starvation again. You will also notice by the count in each Worker Role that they are load balanced fairly well. You can play with threads, Web Role instances and Worker Role instances to see how different combinations react.

Conclusion

That’s it! Pretty simple. We got things set up, exercised some of the functionality and got familiar with some of the new namespaces and class names. All together a pretty good skittles game!