Summary of “Developing Multi-tenant Applications for the Cloud”

How can a company create an application that has truly global reach and that can scale rapidly to meet sudden, massive spikes in demand? Historically, companies had to invest in building an infrastructure capable of supporting such an application themselves and, typically, only large companies would have the available resources to risk such an enterprise. Building and managing this kind of infrastructure is not cheap, especially because you have to plan for peak demand, which often means that much of the capacity sits idle for much of the time. The cloud has changed the rules of the game: by making the infrastructure available on a “pay as you go” basis, creating a massively scalable, global application is within the reach of both large and small companies.

Yes, by moving applications to the cloud, you're giving up some control and autonomy, but you're also going to benefit from reduced costs, increased flexibility, and scalable computation and storage. This guide shows you how to do this.

This guide is the third release of the second volume in a series about Windows Azure. It demonstrates how you can create from scratch a multitenant, Software as a Service (SaaS) application to run in the cloud by using the latest versions of the Windows Azure tools and the increasing range of capabilities of Windows Azure.

The guide is intended for any architect, developer, or information technology (IT) professional who designs, builds, or operates applications and services that are appropriate for the cloud. It is primarily written for people who work with Windows-based systems. You should be familiar with the Microsoft .NET Framework, Microsoft Visual Studio, ASP.NET, SQL Server and Microsoft Visual C#.

Chapters in the Guide

Chapter 1, “The Tailspin Scenario” introduces you to the Tailspin company and the Surveys application. It provides an architectural overview of the Surveys application; the following chapters provide more information about how Tailspin designed and implemented the Surveys application for the cloud. Reading this chapter will help you understand Tailspin's business model, its strategy for adopting the cloud platform, and some of its concerns. It will also help you to understand some of the fundamental choices Tailspin had to make when designing the application.

Chapter 2, “Hosting Multi-tenant Applications on Windows Azure” discusses the major considerations that surround architecting and building multitenant applications to run on Windows Azure. It describes the benefits of a multitenant architecture and the trade-offs that you must consider. This chapter provides a conceptual framework that helps you understand some of the topics discussed in more detail in the subsequent chapters.

Chapter 3, “Choosing a Multi-tenant Data Architecture” describes the important factors to consider when designing the data model for multitenant applications. The major factors are how you can partition data, plan for extensibility and scalability, and how you can apply your design using Windows Azure storage and a relational database. The chapter also describes how the Surveys application stores data in both Windows Azure tables and blobs, and how the developers at Tailspin designed their storage classes to be testable. The chapter also describes the role that Windows Azure SQL Database plays in the Surveys application.

Chapter 4, “Partitioning Multi-tenant Application” describes how you can partition your application code for multiple tenants. This includes how you can use Cloud Services web and worker roles, queues, and the Model View Controller pattern to best effect in a multitenant application. The chapter also discusses issues around caching and how Tailspin solved some specific problems related to implementing session state.

Chapter 5, “Maximizing Availability, Scalability, and Elasticity” describes techniques you can use to get the best performance and responsiveness for your applications, especially when they are designed to support multiple tenants. The chapter covers topics such as hosting the application in multiple geographic locations, using the Content Delivery Network (CDN) to cache content, read and write patterns using queues, paging and displaying data, and autoscaling the role instances.

Chapter 6, “Securing Multi-tenant Applications” describes authentication and authorization scenarios for multitenant applications when supporting individual subscribers and users, and trust relationships. It also examines how Tailspin implemented protection and isolation of sensitive data, and how it protects session tokens.

WebAii testing framework. This is required only if you want to run the functional tests. Place the assembly ArtOfTest.WebAii.dll in the Lib\WebAii folder of the examples.

Other components and frameworks required by the examples are installed using NuGet when you run the solutions. See the Release Notes included with the examples for instructions on installing and configuring them.

Community

This guide, like many patterns & practices deliverables, is associated with a community site. On this community site, you can post questions, provide feedback, or connect with other users for sharing ideas. Community members can also help Microsoft plan and test future guides, and download additional content such as extensions and training material.

Feedback and Support

Questions? Comments? Suggestions? To provide feedback about this guide, or to get help with any problems, please visit the Windows Azure guidance Community site. The message board on the community site is the preferred feedback and support channel because it allows you to share your ideas, questions, and solutions with the entire community. This content is a guidance offering, designed to be reused, customized, and extended. It is not a Microsoft product. Code-based guidance is shipped "as is" and without warranties. Customers can obtain support through Microsoft Support Services for a fee, but the code is considered user-written by Microsoft support staff.