.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Articles >> Azure >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Azure Part 10: Worker Role Detailed

Posted By:Jean Paul       Posted Date: October 14, 2011    Points: 200    Category: Azure    URL: http://www.dotnetspark.com  

Worker Role Detailed

Worker Role Detailed 

In this article we can summarize the points on Worker role deployed in previous article.


Virtual Machine Size 

The virtual machine size provides the resource capacity of the virtual machine.  The parameters varying with virtual machine size are:


  • CPU Speed
  • Memory (RAM)
  • Instance Storage (Hard Disk)
  • I/O Performance


The sizes for virtual machine are:

  • Extra Small
  • Small
  • Medium
  • Large
  • Extra Large


The cost of billing will be varying depending on the virtual machine size. 

The ServiceDefinition.csdef file can be used to specify the VM size.


xml version="1.0" encoding="utf-8"?>

<ServiceDefinition name="WorkerRoleExample" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">

  <WorkerRole name="WorkerRole1" vmsize="Small">


      <Import moduleName="Diagnostics" />





Instance Count 

The number of instances of the Worker role can be specified using the instance count option.  The number of instances will be managed by a Load Balancer automatically by the cloud. 


The ServiceConfiguration.cscfg file can be used to specify the instance count.


xml version="1.0" encoding="utf-8"?>

<ServiceConfiguration serviceName="WorkerRoleExample" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*">

  <Role name="WorkerRole1">

    <Instances count="1" />


      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />





Locating the files 

From the solution explorer we can locate the files as shown below:




Deleting the Worker Role 

As mentioned in the previous article, any computing hours excess of the trial limit will be charged.  So we need to ensure that the instances are stopped and deleted.  The steps are depicted below:


Step 1: Stopping an Instance 

Sign in to the Windows Azure Portal, click the Hosted Services link to vie the hosted services and click Stop from the toolbar.


The order of clicking is depicted as sequence.



Step 2: Deleting an Instance 

Once the instance is stopped, click on the Delete button to delete the instance. (This is for demonstration and one may keep the instance if it is needed in future)



On clicking the Delete button you will be prompted with a confirmation dialog.



Click on the Yes button for proceeding with the Delete operation.  Now you can see the status being changed to Deleting.



After the operation is completed, the above entries are removed from the list.  So it confirms the Delete  operation.

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend