Azure from the Front Lines

Over the last year I have been building a cloud services company using Microsoft Azure as our platform. Why Azure? Well the first reason was that mainly develop on the Microsoft platform, although now that’s becoming less and less of true. The second is the BizSpark program that gives startups access to great Microsoft software and hardware for 3 years. Lastly I think Microsoft has built a compelling cloud platform, the list of features are amazing and the flexibility you get sometimes can be unreal. But when things go wrong they really go wrong.

I’ve had some history with Azure. I was at the PDC where it was announced and went to a lot of presentations regarding it over the next few years. Finally I decided last year to found a company that would provide a cloud based logistics system for first responder organizations (like fire departments, ems, police, etc). Around October of 2012 my system, in very early beta, went live on Azure and has been running there ever since, with over 99% availability.

Spinning up the app and deploying it took no time at all. Unfortunately up until August of 2013 what you got for free on Azure was limited, for example I couldn’t use Azure Websites like I wanted, because it wasn’t part of my BizSpark allotment, I had to use Cloud Services. which is the elder statesman of Azure being the original feature next to blob storage.

So here are some of the issues I’ve run into in my first year so hopefully you don’t have to. The thing I’ve noticed about Azure is that there is very little best practice information out there and why things need to be done a certain way. Hopefully I can help a little.

SQL Azure is Unreliable

This really should not be a surprise, as Microsoft has said it many times before. If you contact MS Support about SQL Azure database issues you will be directed to these three sites, and So you might as well read them now. Microsoft Pattern and Practices has put out the Transient Fault Handling application block a must when working with Azure resources like SQL Azure. You also cannot use the default ASP.Net membership and authentication that we get in MVC/ASP.Net apps unless you build retry logic on top of it. SQL Azure will go down on you for a period of time, sometimes a few seconds, sometimes a few minutes and sometimes for hours. Plan on it and mitigate it. Via my logs I have a SQL Azure issue every few days on a very low traffic website (mainly due to my use of ASP.Net auth provider). SQL Azure only provides fault tolerance, but you can still loose all your data. RedGate has a service that I use to backup my SQL Azure db to geo-redundant blob storage.

Always Create a Virtual Network

On man did this one bite me hard two weeks ago. Once you create anything in Azure you cannot add it to a virtual network after the fact, Cloud Services, VM’s, etc. Even if you never plan on using backend VM’s or private/internal systems create a Virtual Network and an Affinity group and add everything to it. Cloud Services cannot loop back to VM via Virtual IP’s only via Internal Virtual Network IP’s. Save yourself a lot of trouble and get this rolling as your very first Azure activity.

Virtual IP Addresses Change

Yea, this sucks. But every time you do a full new deployment to Azure for your cloud services it’s Virtual IP Address will change. If your using the Azure project in Visual Studio it automatically checks the Deployment Upgrade checkbox in the Advanced Settings tab on the Publish screen. Deployment Upgrades don’t do a full recycle of the environment, they just update changed code. This is ok for 90% of the time, but sometimes you need to make an Azure configuration change and modify those cscfg files, that will require a full update, which means unchecking that check box and loosing your Virtual IP. I highly recommend using CloudFlare in front of Azure. If you do you can handle VIP changes far easier then with just CNAME DNS.

Azure Tools Suck

Between PowerShell, CLI, Azure Projects in VS and the Management Portal each tool has it’s own nuances and each gives you strange, confusing and contradictory error messages. One recommendation I have is if your having issues publishing from Visual Studio’s Azure projects just create a package, and use the Management Portal, it gives slightly better error messages.

Monitor Your Azure Expenses

You need to keep an eye on your Azure Expenses. Once you remove that spending limit you cannot set another one. Why they don’t let you set alerts or a non zero cap is beyond me. Lately Microsoft has been making some horrible decisions and those extend into Azure as well. Somehow one of my instances went from an Extra Small to an Extra Large. Microsoft only refunded 1 month, as it ran that way for 2 months. Getting Microsoft to refund money is very difficult. You have a very limited time window when you get your invoice to dispute the change, past that then good luck. CloudExpress is one way of trying to monitor Azure’s costs like CloudAbility but I haven’t gotten my Azure account working in CloudExpress and CloudAbility doesn’t support Azure.

Cloud Service Deployments

Don’t get too attached to your cloud service deployments. I’ve been told by a few times by Microsoft support that some changes cannot be made once a cloud service is deployed. Not even a full update will accommodate those changes and you will have to completely remove and deploy a brand new cloud service to implement the change.

Information is out of date and scarce

The vast majority of information you find regarding Azure out on the Internet is out of date. I can’t tell you how many times I’ve pulled up an article and found that it was the old Azure interface. Finding answers to solutions, like Virtual Network problems is also very difficult. Take for example this Azure SQL Database Performance Guide that Microsoft support sent me a number of the links in it don’t work. Get used to it. You also have to pay for Support on Azure, thankfully they have a low cost developer plan, but you get ‘best effort’ response and it costs around $10 dollars a month.

So that’s some of the issues I’ve run into in year one. I feel it’s getting better but Microsoft isn’t the best at providing clear and easy to understand guidance or documentation. Also if Azure keeps evolving as quickly as it is there will be more and more out of data info on the Internet. The best advice I can give you for working with Azure is have a plan B for everything you can, chances are within a year you will need to use some of them at least once.

About: Shawn Jackson

I’ve spent the last 18 years in the world of Information Technology on both the IT and Development sides of the aisle. I’m currently a Software Engineer for Paylocity. In addition to working at Paylocity, I’m also the Founder of Resgrid, a cloud services company dedicated to providing logistics and management solutions to first responder organizations, volunteer and career fire departments, EMS, ambulance services, search and rescue, public safety, HAZMAT and others.