Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 753671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:55:28+00:00 2026-05-14T14:55:28+00:00

What is the best practise solution for programmaticaly changing the XML file where the

  • 0

What is the best practise solution for programmaticaly changing the XML file where the number of instances are definied ? I know that this is somehow possible with this csmanage.exe for the Windows Azure API.
How can i measure which Worker Role VMs are actually working? I asked this question on MSDN Community forums as well: http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/02ae7321-11df-45a7-95d1-bfea402c5db1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:55:28+00:00Added an answer on May 14, 2026 at 2:55 pm

    To modify the configuration, you might want to look at the PowerShell Azure Cmdlets. This really simplifies the task. For instance, here’s a PowerShell snippet to increase the instance count of ‘WebRole1’ in Production by 1:

    $cert = Get-Item cert:\CurrentUser\My\<YourCertThumbprint>
    $sub = "<YourAzureSubscriptionId>"
    $servicename = '<YourAzureServiceName>'
    Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub |
    Get-Deployment -Slot Production |
    Set-DeploymentConfiguration {$_.RolesConfiguration["WebRole1"].InstanceCount += 1}
    

    Now, as far as actually monitoring system load and throughput: You’ll need a combination of Azure API calls and performance counter data. For instance: you can request the number of messages currently in an Azure Queue:

    http://yourstorageaccount.queue.core.windows.net/myqueue?comp=metadata
    

    You can also set up your role to capture specific performance counters. For example:

     public override bool OnStart()
     {
        var diagObj= DiagnosticMonitor.GetDefaultInitialConfiguration();
        AddPerfCounter(diagObj,@"\Processor(*)\% Processor Time",60.0);
        AddPerfCounter(diagObj, @"\ASP.NET Applications(*)\Request Execution Time", 60.0);
        AddPerfCounter(diagObj,@"\ASP.NET Applications(*)\Requests Executing", 60.0);
        AddPerfCounter(diagObj, @"\ASP.NET Applications(*)\Requests/Sec", 60.0);
    
        //Set the service to transfer logs every minute to the storage account
        diagObj.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(1.0);
    
        //Start Diagnostics Monitor with the new storage account configuration
        DiagnosticMonitor.Start("DiagnosticsConnectionString",diagObj);
    }
    

    So this code captures a few performance counters into local storage on each role instance, then every minute those values are transferred to table storage.

    The trick, now, is to retrieve those values, parse them, evaluate them, and then tweak your role instances accordingly. The Azure API will let you easily pull the perf counters from table storage. However, parsing and evaluating will take some time to build out.

    Which leads me to my suggestion that you look at the Azure Dynamic Scaling Example on the MSDN code site. This is a great sample that provides:

    • A demo line-of-business app hosting a wcf service
    • A load-generation tool that pushes messages to the service at a rate you specify
    • A load-monitoring web UI
    • A scaling engine that can either be run locally or in an Azure role.

    It’s that last item you want to take a careful look at. Based on thresholds, it compares your performance counter data, as well as queue-length data, to those thresholds. Based on the comparisons, it then scales your instances up or down accordingly.

    Even if you end up not using this engine, you can see how data is grabbed from table storage, massaged, and used for driving instance changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 369k
  • Answers 369k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Would be easier to know the structure of aggregateflags table… May 14, 2026 at 6:26 pm
  • Editorial Team
    Editorial Team added an answer myReverse :: [Int] -> Int -> [Int] myReverse [] n… May 14, 2026 at 6:26 pm
  • Editorial Team
    Editorial Team added an answer I think you need properties for the selected role and… May 14, 2026 at 6:26 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.