// I need to

ModernizeUpgrade without breaking it RescueFix what someone else started Build NewTurn an idea into a product Reach More PeopleGet found, get used, include everyone

// Company

Case StudiesExpertiseAbout + CareersResourcesContact Book a call →
≡articleBuild New

Cloudy with a Chance of VMs: Scaling Up & Out with Azure

Part 1 on scaling Azure Web Apps: scaling up versus scaling out, and the undocumented details to plan for when building or porting a .NET app to Azure.

Art+Logic Feb 27, 20176 min read

From the Art+Logic archive · written in 2017. The tools may have moved on; the thinking still holds.

Cloudy with a Chance of VMs

Many undocumented subtleties figure prominently when designing and scaling the Azure architecture of a new Azure Web App, whether starting from scratch or porting an existing .NET app to the Azure Cloud. It’s always best to determine system compatibilities and custom needs prior to deployment. While Microsoft’s Azure documentation is generally good, navigating the often undocumented details can prevent pitfalls and optimize the scalability of your Azure Cloud-based solution.

Scaling Up: growing the size of an existing resource

Screenshot of scaling up Azure Web App

Azure resources are generally simple but relatively expensive to grow in size or scale up:

Since scaling up is relatively cheap in terms of effort, one can experiment with various combinations of tiers for different resource to find the sweet-spot for a given application.

Just remember to turn down the heat (dial-down from the most expensive tiers) if you intend to leave a test project on the burner for weeks or months!

Scaling Out: multiplying and pooling the number of allocated resources

Azure resources are generally much more difficult to scale out, depending on what type of resources they are. However, Cloud Computing shines in a cost-benefit analysis when nearly unlimited resources are available at a moment’s notice but resources must only be paid for if and when they are needed; the trick is the Cloud’s ability to scale quickly enough to respond to peak loads.

Here are three commonly-scaled resource types ordered in ascending scale-out difficulty:

  1. Azure Web Apps
  2. Azure SQL Databases
  3. Azure VM Servers

Azure Web Apps

Load Balancers can be configured to delegate incoming requests to a pool of back-end VMs or Web Apps. Out of the box, a single Web App Service plan can host one or more instances of a website.
Separate App Plans can be individually scaled, or a single App Plan’s Deployment Slots can be leveraged to deploy several different sites or different versions of the same site, e.g.:

If premium-tier multiple app instances still can’t handle the load, an Azure Load Balancer can delegate to multiple Web App Service Plans.

Azure SQL Databases

Deploy Database to Microsoft Azure SQL Database...

Azure SQL offers the power of SQL Server without the work of installing, configuring and maintaining a server.
Furthermore, thousands of very large databases can be individually scaled, even when running on the same Azure SQL server, which should be thought of more as a security and organizational silo than a container of limited performance or size.

Migrating an existing SQL Server Database to Azure

If your Web App load is highly variable (i.e., you need to handle large spikes in traffic or database load), Azure Elastic DB pools can also be used to dynamically-size Azure SQL services to provide high-performance when you need it but lower costs when you don’t.

Azure VM Servers

This blog’s pragmatic focus precludes a survey of the full array of Azure offerings including Cloud Services, Service Fabrics, Containers, Functions and Batches.

Basic Azure Wep Apps can often play host to an existing website after minimal porting effort, including the re-deployment of background Windows Services as worker-level Azure Web Jobs. In many cases, the existing Website project and its Windows Service dependencies can be deployed to Azure by simply right-clicking on the projects in Visual Studio and selecting ‘Publish Web App’ and ‘Publish as Azure WebJob’, respectively.

But let’s face it; sometimes even a cloud-deployed Web App still needs the support of a good, old-fashioned server, whether that means a full, RDP-enabled Windows Server or an auto-scaled VM spun up from a generalized image that we can never directly reconfigure.

Azure VMs running Windows Server OS remain a popular choice for many organizations who may:

For example, Azure Web Apps and Web Jobs do not support:

As with Azure Web Apps, if a single premium-tier VMs still can’t handle the load, an Azure Load Balancer can delegate to a pool of VMs in an Azure Availability Group.

VM Creation for Load-balanced Backend Pool

Capture Image from VM:

Once a VM is in the desired state, an image is captured to clone the VM; cloning may need to be repeated if significant changes are made to the VM.

.\AzCopy
 /Source:https://<vm_storage_account_source>.blob.core.windows.net/<your_vm_storage_container_source> `
 /Dest:https://<vm_storage_account_target>.blob.core.windows.net/<your_vm_storage_container_target> `
 /SourceKey:<storage_source_key> `
 /DestKey:<storage_dest_key> `
 /Pattern:<virtual_hd_name>.vhd

Restart the VM that was stopped

Create (clone) VM from Image:

My next blog installment will explain how to configure an Azure Load Balancer and will compare Manual VM scaling to Auto-Scaling via Azure Scale Sets.

keep going

More to explore in Build New.

All Build New resources →
let's talk

Got a problem like this one?

Tell us what's stuck. A real person replies within one business day.

Talk to our team →

Talk to people who know software, not a sales script.

Your first call is with Aja, our VP of Sales. He'll help make sure you're solving the right problem. Here's what you'll cover together:

  1. What you're trying to accomplish

    The business goal first, then the technology.

  2. Possible approaches

    And the tradeoffs of each, in plain language.

  3. Risks you may not have considered

    Technical and business, before they cost you.

  4. Whether AI changes the math

    What's practical, and what's just hype for your project.

  5. Sensible next steps

    Even if the right next step is not us.

book-a-call.ics

Loading the scheduler…

Open the booking page →

Some problems are easier to explain in writing. Send us a few lines about what you're working on, and we'll reply within one business day. Helpful to include:

  1. What the software does, or should do
  2. What's stuck, or what's worrying you
  3. Any deadline or budget you have in mind
note.md

Loading the form…