Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can I easily have 100 web apps that barely do anything on my local machine but not on Azure App Service?

I'm trying to understand how I need to setup my Azure infrastructure for a large amount of low traffic apps. I'm trying to get a better picture of the underlying limitations.

Why can I easily have 100 web apps that barely do anything on my local machine but not on Azure App Service?

Azure starts warning you already at 17 web apps for a server that you pay 1440 euros per year. So we are talking about 17 apps where the majority barely has any traffic.

Worse - even staging slots count. So you constantly have to manually stop your staging slot or you are in bad luck and can only run 8 low traffic apps for 1440 per year.

This is from a smaller instance on Azure (8 app limit - 4 if you have staging slots)

Description Your App Service Plan is nearing saturation.

We detected your app is running on a Small sized worker and the current App Service Plan, Default1, on an average, is running 8 simultaneously active apps.

Apps that are a part of the same App Service Plan, compete for the same set of resources. Our data indicates that 8+ active apps in an App Service Plan running on a small sized worker deterioates apps performance. It causes CPU and memory contention resulting in availability and reliablity loss.

Consider one of the solutions described in the Troubleshooting and Next Steps below.

Additional Information For production applications, it is recommended that an App Service Plan does not exceed a certain number of sites. The number may actually be lower depending on how resource intensive the hosted applications are, however as a general guidance, you may refer to the table below.

enter image description here

In their documentation (sales process) they promise unlimited:

enter image description here

enter image description here


Multiple times I tried getting a proper answer through the Azure help desk, but they keep giving vague answers, like competeting resources - without specifying what that is. Also when this App Service is within CPU and memory limits.

So it is a recommendation - why do I care?

Because when I have application instability (more then once the underlying storage) they always refer to that I should first limit the amount of apps to be in the recommended range.

This means that at the moment there is no solution within Azure for a large amount of microservices and low traffic apps.

To at least understand this better - what is the difference between Azure and my local machine? What is this resource that is getting depleted with a large amount of passive apps in a cloud environment - as this doesn't seem to be memory or CPU.

Secondary - what is the workaround for a large amount of sites that just have tens of hits per day?

like image 289
Dirk Boer Avatar asked May 01 '20 14:05

Dirk Boer


People also ask

What is Azure web app?

Azure Web App provides a hosting service in Azure which developers can use to develop different kinds of mobile applications or web applications. Azure Web App Tutorial Azure Web App provides a platform to build different kinds of mobile applications or web applications. No need to deploy, configure, and maintain your own Azure virtual machine.

What services does Azure offer for web hosting?

Besides App Service, Azure offers other services that can be used for hosting websites and web applications. For most scenarios, App Service is the best choice. For microservice architecture, consider Azure Spring-Cloud Service or Service Fabric.

Can Azure App service plan run multiple web apps?

And also is there any implications for deploying multiple web Apps on an Azure App Service plan An App Service Plan is capable to run multiple Web Apps, each in its own sandbox. It's like a VM but as a PaaS service.

How much storage capacity does Azure App service offer?

I think Azure App service offers only 50gb storage. The 10 Web Apps would require storage capacity far more than 50gb; is it scalable or can we link each of these Apps to an Azure storage account. And also is there any implications for deploying multiple web Apps on an Azure App Service plan


1 Answers

1. App service plan Tier

You are using the Isolated service plan that is the typical plan one would go for. According to Microsoft's documentation:

The Isolated service plan is designed to run mission critical workloads, that are required to run in a virtual network. The Isolated plan allows customers to run their apps in a private, dedicated environment in an Azure datacenter using Dv2-series VMs with faster processors, SSD storage, and double the memory-to-core ratio compared to Standard. The private environment used with an Isolated plan is called the App Service Environment. The plan can scale to 100 instances with more available upon request. You can find more details on the Isolated plan and App Service Environments

It is fully isolated, running on its own virtual network and it runs on a private, dedicated environment in an Azure datacenter using Dv2-series VMs with faster processors, SSD storage, and double the memory-to-core ratio compared to Standard.

This is not something one would typically need for a 100 passive apps. Have also in mind that a staging slot is a proper web app. In many cases is used for final testing before you go to production.

My first recommendation would be to take a look at cheaper app service plan options that meet your standards, as Isolated plans are very very expensive.

2. Resource limits vs Guidelines

Microsoft might say that you can host "Unlimited services" but if you look at the small letters of the contract in order to get support you have to follow the recommended guidelines that in your case is 17 apps.

3. Home vs Cloud

Every running application has its overhead in memory. Depending on the application it might be smaller or bigger. A couple of static lists or dictionaries might be enough for the application to start consuming more memory than you imagine. CPU is usually harder to have a leak (endless loop). Nevertheless it is not fair to compare your local computer that I guess it has 16GB of RAM and 4 to 6 cores, with the smaller instance of an isolated service that has 1 core and 3.5GB of RAM. enter image description here

Your laptop is so much faster...

4. Updated Suggested Solution (Use of S1 and S2 plans)

If you want Microsofts support you have to follow their recommendations.

If you do not need support I would strongly suggest to closely monitor your app serivice plans because you actually might run out of resources. S1 plan have 1.75 GB memory, it is not much at all. Memory depletion in your server could cause several unexpected issues.

If I were you I would upgrade from S1 and S2 to P1V2 and P2V2. With minor increase on the cost you get more than double the resources, plus Microsofts recommended apps increase to 16!

enter image description here

By moving to P1V1 and P2V2 plans, you actually save money. You could also take a look at Fabric Mesh.

like image 194
Stelios Giakoumidis Avatar answered Oct 28 '22 17:10

Stelios Giakoumidis