Tuesday, December 7, 2010

Things to consider when migrating to Azure

Migrating existing .NET apps to Windows Azure is usually not much of a problem. It's easy to get it run, it's harder to have it scale. It's about rewriting and re-architecturing your application to fully benefit of the concepts in Azure. Storage (table, blobs, queues), SQL Azure, appfabric etc. Some pitfalls:

- session state: to be scalable store your session data in Table Storage (provider for this is TableStorageSessionProvider and example can be found at ). It's easy, it's scalable and it's cheap and it's always there!
- Separate frontend logic with background tasks and use queues to loosely couple it. Keeps your application scalable and enables you to scale web and worker roles when needed.
- where is my active directory? When moving to Azure and your app is e.g. an intranet application you don't want users to have another login. To tackle this there are two options. First, use Active Directory Federation or second, use the latest Azure Connect. Azure Connect actually enhances your own datacenter by adding Azure nodes to it. Azure Connect makes it easier to migrate because you can setup connectivity between your onpremise stuff and Windows Azure assets.
- from SQL to SQL. Migrating 100% onpremise SQL Server to SQL Azure only needs you to change the connectionstring and make sure you don't use Windows Authentication since Azure won't support it. The more difficult question would be. Do i actually need SQL Azure since it's rather expensive compared to Table or Blob storage. Maybe even a lightweight DB WebEdition will suffice and additional storage possibilities can complement your storage needs.



Part of migrating your application is to change the way you deploy your app (from onpremise to Azure). Using the Windows Service Management API is easy and straightforward and can help you incorporate deploymentlogic into your daily build process. Write your own buildtasks to deploy your app to Staging and have your tests run there, get the results and suspend and delete it again to safe money. Make sure you run your test for factors of an hour since you are charged by the hour.

Patterns & Practices published an excellent PDF around migrating your applications to the cloud.

Will blog some more around migration issues.

No comments:

Post a Comment