Skip to main content

Scaling Azure Web Apps

What is Scaling?

Scaling in Web Applications world refers to adaptability to changed load and traffic. Availability and Performance are the most important aspects of any Web Application. Hence, any Web App should be able to adapt to the changed amount of workload and traffic that it gets.
When we deploy our web apps to azure, it is called an instance. It is allocated certain amount of hardware resources & servers depending upon your App Service Plan.

There are basically two kinds of scaling that is performed on a web application:

  1. SCALE OUT (Horizontal)

    • Scale Out refers to increasing the number of instances for your web application. To scale out a web app, you increase the number of virtual machine instances on which your web app is running.

  1. SCALE UP (Vertical)

    • Scale Up refers to increasing the resource capacity, such as RAM and CPU cores, of the virtual machine on which your web app is running.

Why Scaling?

  • Pages load slowly,
  • Network connections start timing out, and
  • Your servers are starting to creak under heavy load. 

When to Scale Up and When to Scale Out?

You typically choose to SCALE UP when any single request demands more memory and processing power to complete.
You typically SCALE OUT when any single request requires less memory and processing power to complete, but the number of incoming requests become too much to be handled by a single server.

How to configure Scaling?

To Scale Up:

  • Go to App Services in the Azure Portal
  • Select App Service
  • Go to Settings
  • Select Scale Up (App Service Plan)
  • Select from the available Plans based on Number of Cores, RAM, Storage, Number of Instances and Backup Frequency.

To Scale Out:

  • Go to App Services in the Azure Portal
  • Select App Service
  • Go to Settings
  • Select Scale Out (App Service Plan)
  • You can Scale Out the app service based on Instance Count, CPU Percentage, Schedule & Performance Rules




Benefits of Scaling?

  • Address bottlenecks in your web app faster
  • No Code required
  • Web app doesn’t need to be re-deployed.
  • Web app can handle more load and therefore service more user requests.

Comments

Post a Comment

Popular posts from this blog

Handling Concurrency in Azure Functions (HTTP Triggered)

Concurrency & Isolation Concurrency is one of the most common requirements when we don't want the resource to be accessed by multiple requests at the same time. Lets say we have a Database that holds products stock information, then it is very important that any read/write operation that happens on the Database must hold the property of Isolation . The isolation property ensures that the concurrent execution of transactions results in a system state that would be obtained if transactions were executed sequentially, i.e., one after the other. Providing isolation is the main goal of concurrency control. Depending on the concurrency control method (i.e., if it uses strict – as opposed to relaxed – serializability), the effects of an incomplete transaction might not even be visible to another transaction. Options Available in Azure Functions Recently while working on Azure Functions, I discovered a really simple way of handling Concurrency via code. There are ways to con

Azure Functions - Retrieve data from Dynamics 365 CRM/CE Online using CRM OData Web API

Introduction: This blog describes how you can retrieve data from Dynamics 365 CRM/CE Online in an Azure Function, using CRM OData Web API. The CRM Web API has a couple of advantages over the traditional SOAP based approach to interact with CRM. These are rest based services, its easy to use and transport over http protocol , and there is no need to use additional web resources (XrmServiceToolkit ) of SDK (SDK.REST). Here is a detailed documentation on CRM OData Wbeb API. I will be using an Azure Function Application in Visual Studio 2017 to retrieve records from Dynamics 365 CRM/CE, by making use of OData API Endpoint provided by CRM. Prerequisites: Dynamics 365 CRM Online Trial https://trials.dynamics.com/ https://signup.microsoft.com/Signup?OfferId=bd569279-37f5-4f5c-99d0-425873bb9a4b&dl=DYN365_ENTERPRISE_PLAN1&Culture=en-us&Country=us&ali=1 Azure Subscription related to CRM Online instance https://portal.azure.com/ Visual Studio 2017 with Cl

Retrieve 5000+ Records in Dynamics 365 CE using CRM OData, Fetch XML and C#

If you want to retrieve 5000+ records in Dynamics 365 CE, you need to make use of Paging concept of CRM. By default 5000 records are retrieved in a single OData call in CRM. To get more, you need to make subsequent calls to OData Endpoint by passing a paging cookie in the request. I will be using a simple C# Console Application to retrieve 5000+ records from Dynamics 365 CE, by making use of OData API Endpoint provided by CRM and passing Fetch XML in OData Call . Concept: CRM OData Endpoints allows us to use Fetch XML to retrieve data from Microsoft Dynamics 365 CE.  If your resultset has more than 5000 records, you will be returned with first 5000 records ONLY in one OData call. To know if the resultset has more than 5000 records, we make use of the response from OData call. The response is added with a cookie value contained in a key - "@Microsoft.Dynamics.CRM.fetchxmlpagingcookie" If you wish to fetch the next set of resultset data, you will have to pass this c