Moving to Azure

by Joseph on Feb 27th in .Net, Azure, C#

I spent last weekend moving a client’s website from a traditional host into Azure Websites. I learned a few things, and made a few mistakes, but mostly it went fairly well. I thought I should share a little of my experience out here.

What went well?

The site moved directly from the traditional host to the Azure website, with no difficulty. The SQL Server was a little more complicated, but the SQL Azure Migration Wizard made the task fairly pain-free. I do recommend reviewing, and perhaps truncating, log files that are unnecessary (old error logs, user access logs, etc). I was also able to push the source code up to Visual Studio Online (Git) easily, and now I feel more confident making changes and working on site innovations. Previously, the site was using the “Copy and Date” source control method. Yeah, I know. Haters gonna hate. It was 2005, and things.

What did I learn?

Azure pricing is a mystery. I’m pretty sure this is going to be more cost effective than the old system. My estimate is somewhere around $75-$100 a month, with Geo-Redundancy, Auto-Scaling, AzureSql, etc. That said… When my customer asked “how much is this going to cost me”? I wasn’t really sure how to answer. My question to you, dear readers… How do you price out Azure web sites? Do you do a flat-rate that is a typical average? Do you invoice the actuals every month? What works best for you?

I learned how to build and deploy from Visual Studio Online directly to an Azure Website. This was a little more complex than I expected. For those of you keeping score, Azure is rolling out a new management portal. There are things you can do there that you can’t do in the OLD portal. But there’s things you can do in the OLD portal that you CAN’T do in the NEW one. For instance…

  • In order to add a Continuous Integration (CI) build to a development slot of your website, you need the “New Portal” (https://portal.azure.com)
  • You also need to have Visual Studio Online associated with an Active Directory slot in your account
  • To do THAT, you need the “Old Portal” (https://manage.windowsazure.com)
  • Which means that in order to get the CI build, you likely need TWO separate windows of Azure open
  • In fact, the whole time I was working last window, I had a MINIMUM of two Azure management portals open!

This process is evolving and becoming much easier, but has a long way to go.

What did I screw up?

My biggest fail over the weekend was underestimating the traffic that this particular customer generates. I initially set their “Instance Size” to “Small” – which would support your typical blog\website\etc. However, his company generates a LOT of traffic related to eCommerce, and in the middle of the week, there was too much traffic and the site shut down. It was fairly simple to fix. I upgraded the site size, added some auto-scaling, and included some alerts for downtime.

What am I happy about?

I feel like we’re in a better place now for moving forward into modernity. The application will probably never be a poster-child for TDD, Separation of Concerns, DDD, etc… But now I feel like I can start cleaning up some of the weird stylistic choices that were made, including things like: table layout instead of div layout, aspx pages without separate code behind files, inline CSS, and (speaking of CSS) CSS style names like “style1”,  “style2”, etc.

What next?

Azure offers a number of add-ons that I will be exploring in detail. New Relic, for instance, has an add on that offers analytics and performance telemetry. This would be very useful in the current application! Another add-on I would like to investigate is a mail service. Currently, I have a queuing and mail service which tries to avoid dropping emails if the email service is unavailable. I would like to move to a more reliable queuing service (Azure Queue?) and then implement a better mail service.

Once I have the queuing set up, I would like to begin using these for managing receipt generation, order management… basically all of the business process flow that is currently coded directly in to the views of the website.

Tags

Leave a Reply

Powered By Wordpress Designed By Ridgey