I’ve had hands-on experience with Microsoft’s Azure cloud compute services for quite a while. Using services such as the; Virtual Networks (vNet), Virtual Machines (VM), Insights, Storage Accounts, Network Security Groups (NSG), Recovery Service Vaults, Web App Services, etc. All used to build and maintain solutions for both client and personal needs.
For this read, I'll focus on two solutions available within the Azure suite, and why relying on the Web App Services for hosting may actually not be the best solution. Instead– you might want to consider spinning up a Virtual Machine (VM)!
On paper, the Microsoft Azure App Service looks great and seems the most viable solution. I mean, it has been purpose built to enable customers to quickly deploy powerful cloud apps using the fully managed platform. You won’t need to worry about installing .NET, Java, Ruby, Node.js, PHP, Python... It’s all been done for you. Just needs enabling with a tap of a button. I’m selling this to you, aren’t I?
But before we all get to pumped, let's take a trip to where it all started.
When you get started with the Azure Web App Service, everything ran as you'd expect. I was excited! Apps were easy to configure, and quick to deploy via Github. Things ran smoothly without a hick-up for months. I was in heaven; this was effortless and worry free– what a solution!!
"Well done to the Azure team 🙌"
I didn't hesitate in pushing the remainder of my clients of all shapes and sizes onto the solution, why wouldn't I!
But as time passed, I started to notice very small outages on some of my client Web Apps. They were totally random and weren't anything big at this point. And to be fair, I likely only noticed these outages because I monitored these Web Apps 24/7.
For monitoring the web apps, I used Pingdom. With a network of 60+ probe servers, Pingdom tests are available from all over the world, as often as every minute. If there's an outage, Pingdom can alert you within milliseconds, ensuring you’re the first to know.
The outage alerts came in, but before I could jump onto Azure to look into resolving outage, the Web Apps would come back online. After a few weeks of this happening, I put my research hat on.
I started to notice the outages were taking place in ‘off-peak hours’ and would never fail during normal working day hours. Annoying! But either way, I decided to turn a blind eye and assumed the outages were simply a bit of Azure internal maintenance and would soon be a thing of the past.
Showing past 6 months uptime/outages of apps running via App Service
Showing past 6 months uptime/outages of apps running via Virtual Machine
Outages occurring about twice a month, then unexpectedly increasing to once a week. Then blowing up to become a serious issue, with outages now taking place multiple times throughout every evening and night.
I couldn’t simply ignore this. The outage periods were lasting longer and started displaying “Page cannot be displayed because an internal server error has occurred” errors when attempting to reload Web Apps in a browser.
This service charges my clients £60+ a month (exc. the additional scale-out costs). The fact is, this was more unreliable than a £4 a month hosting solution– it's not great. I’ve done my fair rounds with hosting providers over the years, so I know.
Find the cause
Resolving the never-ending growing issues with the Web App Services was not #1 on my priority list. At this point, the only solution was to report the issue to the Azure support team.
We enable service logging in the hope that we'd capture what the cause of the outages was, but it didn’t. In fact, logging didn’t pick up anything with the service, which I found a little odd and hard to believe.
The only captured logs, a handful of PHP errors, pages not found, or stale sessions. Nothing out of the ordinary had been captured, not even a cheeky tease about the internal server error.
I continually received endless Web App Service outages. Still throughout the evenings and nights, across multiple separate subscriptions. There wasn't any regional Health Issues showing and Azure support started saying the outages are caused by "storage migrations”.
Outages continued, “PING”… “PING”… “PING”… “PING”… “PING”… every evening and night. This was now really starting to piss me off!!
The hunt continues…
Why a Virtual Machine
When being offered a managed service, there shouldn't be a need to worry about how stable and reliable the service will be. I have years of experience in managing hosting infrastructure, I felt helpless and completely out of control with the Web App Service.
When a Web App Service goes offline, or unresponsive, there is no access to root level or even perform a simply reboot. You don’t have an accessible “host” with Web App Services, it's basically a shared cloud host. The only option you have is Azure support, but even then, a support SLA is required.
Which is why I would recommend anyone weighting up the options of the Web App Service, to consider the Virtual Machine.
Comparing the Pros and Cons between the Web App Service and Virtual Machine (VM)– I feel the only Con for the VM is needing basic system build experience. For example, you'll need to build and configure your Ubuntu (Windows is also available) host. Even then, a friendly freelance experts will be readily available to support you.
At the time of choosing my Azure services, I only chose a VM because the Ubuntu Web App Services Beta had only just been announced. I had to make a rapid host move from Media Temple, to a UK based hosting provider and Azure ticked all the boxes. I also liked and enjoyed that I had free rein over the VM.
Full control over installs of Apache, PHP, MySQL, storage location, cache, and much more. Plus, control over tracing errors and failures. I would be able to resolve internal server errors myself– OMFG! As we know, something you can't do with the Web App Service.
Uptime and response rates have also proven considerably better via the VM, compared to the Web App Services*.
So now looking back to when I first made the switch to Azure. If I had to do it all over again, I'd have chosen the Virtual Machine again over the Web App Service.
The outages have not yet been formally resolved, but we are liaising with the Azure team to trace and resolve the outages with the Web App Service. I'll continue to provide updates as and when they happen.
Making your choice or need advice
If you're in the position of making a switch to Azure and want to ask a question? Leave a comment or email me at firstname.lastname@example.org.
Disclaimer: The views and opinions expressed in this article are my own and do not necessarily reflect the official policy or position of Microsoft Corporation or Azure.
*No significant tests were carried out; I have judged this purely on Pingdom reports and my experience.