DEV Community

Cover image for Why you should probably switch to Azure App Service
Ruheni Alex for Microsoft Student Ambassadors - Kenya

Posted on • Updated on • Originally published at ruheni.dev

Why you should probably switch to Azure App Service

I am a hippie when it comes to technology and I have accepted who I am ๐Ÿ˜”. I have a bad habit of switching very easily from one technology to another and maybe a few commitment issues when it comes to JavaScript frameworks of choice (story for another day). Another thing about me is that I am a big fan of abstraction, not having to deal with the low level stuff - it gets boring at times having to deal with numerous configurations especially infrastructure...maybe I using it is just an excuse for my laziness ๐Ÿ™Š.

For the last year, I have tried out numerous platforms, trying out which one works better for me and I have come to love Netlify, Now, a little bit of GitHub pages and Azure App Service. I got the chance to try out Digital Ocean, Azure VMs, Heroku, the platforms mentioned above and a few others. I cannot say that one is better than the other because everyone is entitled to their opinion. The platforms have different use cases and also differ in pricing and services offered.

The platforms I have mentioned are there because the abstraction taken away, for beginners seeking to share their work with the rest of the world and lazy bums like me ๐Ÿ˜‚. These platforms offer continuous deployment, like most platforms out there, and with little knowledge of any necessary configurations such as web servers like NGINX, domains, load balancers and all those topics that are scary when you take a first look at them and wonder when you will actually deploy your API or site.

Now, Netlify and Azure App service offer one-click deploys, and the fact that you can deploy your site with only a git push is pure genius!! Yes, I know what you're thinking, there are platforms offering the same services too but these ones work just fine for me... we can talk about the other platforms in the comments section and I will be more than glad to try them out.

happy gif

A few features I liked about Azure App service is the Deployment slots, the intuitive UI and the fact that you can link it with various services such as Azure Repos if you prefer a little more privacy, or any (most) 3rd party service you wish. The service works for both fullstack apps in your language of choice as well as APIs (REST and GraphQL). You can connect it to Azure CosmosDb (a database services on Azure) or Azure cognitive services and set up web tasks (e.g cron jobs for your newsletters) pretty easily.

Another reason of choice of this platform is the time to productivity the moment you start working on the project. For those who love using VS Code deployment is also made very easy... with just the click of a button and a couple of fields, your site/service is on the internet, using the Azure App Service extension, in just a few minutes.

The last three features I will talk about provided by the platform include the deployment slots, application insights and scaling feature.
In a nutshell, deployment slots allow you to easily switch between different versions of your application, for example from the development version to the staging/testing or production app with the click of a button. Isn't that just a neat feature??๐Ÿ˜‰

When you deploy your application, you would definitely want to know how it is performing, and this is where app insights come in. You will get access to details such as how many requests your app has, the responsiveness and perhaps when there is a lot of traffic so that you can easily scale up/out you app. Scaling your application works like magic...and it can be automated to scale down too.... and the docs are relatively straight forward and easy to understand.

I hope I have given you enough reasons to switch, or just try App service for your next hobby project and get the all-powerful feeling whenever I use such a service ๐Ÿ™ƒ

All powerful

I am planning to try out Surge soon. If there are any platforms you would love you would like me to try out too, suggest them in the comments and I will be glad to try them out for my next project

Top comments (7)

Collapse
 
jamie3 profile image
Jamie Archibald

Azure app service is garbage in high volume production scenarios.

Collapse
 
siblznbitz profile image
Matthew P Sibley

Interesting - do you have any specifics on those limitations?

Collapse
 
jamie3 profile image
Jamie Archibald

Sure thing. Here are my experiences.

1) Slots are a great feature but using them in production we found it was risky in terms of sharing the same resources on the app service. Often times the app service memory and cpu would spike during deployments and sometimes impacting the production app.

2) The cost of using App Service in a micro-services architecture was incredibly expensive. You essentially have to create an app service plan / micro service, which isn't cheap.

3) We had issues with app service where it was closing socket connections for high volume I/O. After several months with MS engineers we ended up having to replace out entire HTTP client code across all of our services and request MS to increase the number of active TCP connections in our subscription.

4) The load balancer doesn't restart or remove a service out of the pool if it fails. Nor can you restart the specific service manually. You end up having to run two separate app service clusters when this happens.

All in all its a hacky solution and doesnt even compare to AWS offerings.

Thread Thread
 
javiermarasco profile image
Javier Marasco

Jamie, I use web apps in production with a prety decent load, seems you might have an edge case but I can give my modest opinion on the points you mention:

1) Slots should not run code constantly but is true that when you deploy code to them or directly to the app, there is an spike in the CPU usage to 100% for a couple seconds (2 or 3), I experience those as well, true.

2) This is cost effective only if you have more than an app/microservice running in the same app service plan, but I also think in case of real microservice infrastructure, app services are not the best, I would go to AKS instead.

3) Yes, I heard of this problem before, socket connections getting killed randmly when high IO usage, I never faced those personally but I had read that previously.

4) Sadly, this is true in some cases, not long ago I had one instance failing and one working fine and the load balancer was still routing traffice to the faulty one, the thing is that the problem was in the app and not in the infrastructure so for Azure everything "was just fine". In "Diagnose and solve problems" you do have the functionality to restart instances one by one, this is something I learned during that incident.

I hope some of this is of any use to you or anyone else.

Thread Thread
 
jamie3 profile image
Jamie Archibald

We were topping out at around 60 req/sec per app service.

Also try putting an app service n a vnet without having to pay their insane fees for ASE.

I give a lot of credit to MS for investing in Azure, but often I feel they push products onto organizations that haven't been battle tested, leaving their customers to find all the pitfalls.

Collapse
 
brunoprietog profile image
Bruno Prieto

Thanks for the article! One question, how is the pricing of Azure App Service relative to Heroku or Digitalocean App Platform? I'm reading them but it's not clear to me, because Digitalocean charges per component, so if I have my app and job processor is charged twice. In Heroku and App Service, from what I understand, I can have 2 or 3 things running for the same price. Is it like that?

Collapse
 
aslasn profile image
Ande

hmm.. Azure!!