Saturday, March 26, 2011

Amazon Web Services and Windows Azure Architectural Comparison, Part 1

At the recent Cloud Connect show in the Bay Area I attended evangelist Jinesh Varia’s talk on Amazon Web Services design patterns, Design Patterns in the Cloud: A Love Story. I wanted to learn more about how Windows Azure is similar and dissimilar to other cloud platforms, and I found Jinesh’s talk to be insightful, well delivered, and entertaining. I thought therefore it would be useful to present the same progressive scenario as it would be done in Windows Azure.

The scenario in the presentation is Thursdate, a dating website that only runs 3 hours a week on Thursday evenings. Lonely geek Andy creates this site, initially in a very modest form, and it progressively grows and scales.

In writing this, I’ve labored to avoid spin or mischaracterization. However, I must admit my knowledge of AWS is elementary compared to Windows Azure—so please do bring any errors to my attention. Nor am I claiming that everything here is an exact equivalent; this is not the case since no two cloud platforms are identical. I’m merely showing how the same scenario with the same progression would be achieved in Windows Azure.

1. Local Deployment
The first incarnation of Thursdate is hosted locally by Andy. He uses Apache as his application server, develops in PHP, and uses a MySQL database. He backs up to tapes. His deployment looks like this:

Local Deployment


2. Initial Cloud Deployment
When Andy gets the bright idea to move things into the cloud, he minimally needs a server in the cloud, a public access point for his web site, and a way to do backups. A single server in the cloud isn’t going to provide high availability or any guarantee of data persistence--but Andy isn’t concerned about that yet.

AWS: In AWS this means an Amazon EC2 Instance, an Elastic IP, and backups to the Amazon S3 storage service.

Windows Azure: In Windows Azure, the counterpart to EC2 is Windows Azure Compute. Andy must specify a role (hosting container) and number of VM instances. Here he chooses a worker role (the right container for running Apache) and one VM instance. He uploads metadata and an application package, from which Windows Azure Compute creates a Windows Server VM instance. An input endpoint is defined which provides accessibility to the web site. The input endpoint is nominally accessible as <production-name>.cloudapp.net; for a friendlier URL, a domain or subdomain can forward to this address. Backups are made to the Windows Azure Storage service in the form of blobs or data tables.

Initial Cloud Deployment


3. Designing for Failure

Pattern #1: Design for failure and nothing will fail

Andy soon realizes that failures can and will happen in a cloud computing environment and he’d better give that some attention. VM server state is not guaranteed to be persistent in a cloud computing environment. He starts keeping application logs and static data outside of the VM server by using a cloud storage service. He also makes use of database snapshots, which can be mapped to look like drive volumes.

AWS: The logs and static data are kept in the Amazon S3 storage service. Root and data snapshot drive volumes are made available to the VM server using the Amazon Elastic Block Service (EBS).

Windows Azure: Logs and static data are written to the Windows Azure Storage service in the form of blobs or tables. For snapshots, a blob can be mapped as a drive volume using the Windows Azure Drive service. As for the root volume of the VM, this is created from the Windows Azure Compute deployment just as in the previous configuration.

Updated Deployment - Designing for Failure


4. Content Caching

Pattern #2: Edge cache static content

Andy is starting to hit it big, and there is now significant usage of Thursdate in different parts of the world. He wants to take advantage of edge caching of static content. He uses a content distribution network to serve up content such as images and video performantly based on user location.

AWS: Amazon Cloudfront is the content distribution network.

Windows Azure: The Windows Azure Content Delivery Network (CDN) can serve up blob content using a network of 24+ edge servers around the world.

Updated Deployment - Caching Static Content


5. Scaling the Database
In preparing to scale, Andy must move beyond a self-hosted database on a single VM server instance. By using a database service outside of the compute VM, he will free himself to start using multiple compute VMs without regard for data loss.

AWS: The Amazon Relational Database Service (RDS) provides a managed database. Andy can continue to use MySQL.

Windows Azure: Andy must switch over to SQL Azure, Microsoft’s managed database service. This provides him with a powerful database available in sizes of 1-50GB. Data is automatically replicated such that there are 3 copies of the database. In addition, Andy can make logical backups if he chooses--to another SQL Azure database in the cloud or to an on-premise SQL Server database.

Updated Deployment - Using a Database Service


6. Scaling Compute

Pattern #3: Implement Elasticity

With a scalable data tier Andy is now free to scale the compute tier, which is accomplished by running multiple instances.

AWS: Andy runs multiple instances of EC2 through the use of an Auto-Scaling Group. He load balances web traffic to his instances by adding an Elastic Load Balancer.

Windows Azure: Andy has had the equivalents of a scaling group and an elastic load balancer all along: we just haven’t bothered to show them in the diagram until now and he hasn’t been taking advantage of them with a single compute instance. The input endpoint comes with a load balancer. The worker role is a scale group—its instances can be expanded or reduced, interactively or programmatically. The only change Andy needs to make is to up his worker role’s instance count, a change he can make in the Windows Azure management portal.

Updated Deployment – Compute Elasticity


7. High Availability and Failover

Pattern #4: Leverage Multiple Availability Zones

Andy wants to keep his service up and running even in the face of failures. He’s already taken the first important step of redundant resources for compute and data. Now he also wants to takes advantage of failover infrastructure, so that a catastrophic failure (such as a server or switch failure) doesn’t take out all of his solution.

AWS: Andy sets up a second availability domain. His Amazon RDS database in the first domain has a standby slave counterpart in the second domain. The solution can survive a failure of either availability domain.

Windows Azure: The Windows Azure infrastructure has been providing fault domains all along. Storage, database, and compute are spread across the data center to prevent any single failure from taking out all of an application’s resources. At the storage and database level, replication, failover, and synchronization are automatic. The one area where fault domains weren’t really helping Andy until recently was in the area of Compute because he was running only one instance at first. A best practice in Windows Azure is to run at least 2 instances in every role.

Updated Deployment – Fault-tolerant


Summary – Part 1
We’re halfway through the progression, and you can see that Amazon Web Services and Windows Azure have interesting similarities and differences. In both cases we have arrived at a solution that is scalable, elastic, reliable, and highly available.

My main observation is that an informed Windows Azure developer would not need to jump through all of these hoops individually (I suspect that’s also true of an informed AWS developer). Second, some of the discrete steps in this progression are automatically provided by the Windows Azure environment and don’t require any specific action to enable; that includes compute elasticity, load balancing of public endpoints, and fault domains: they're always there. The Windows Azure edition of the scenario does require Andy to change database providers in order to realize the benefits of database as a service; aside from this all of the other steps are easy.

In Part 2 we’ll complete the comparison.

Tuesday, March 15, 2011

Webcast: Windows Azure Compute Architecture

Tomorrow (Wed 3/16/11) I'll be giving the first in a series of public webcasts on Windows Azure architecture. This initial webcast is on Windows Azure Compute.

In this webcast Windows Azure MVP and author David Pallmann will discuss the architecture of the Windows Azure Compute service, the area of the Windows Azure platform responsible for hosting. You'll learn why the execution environment in the cloud is different from the enterprise, pitfalls to avoid, and strengths you can leverage to your advantage. The session will include a tour of compute design patterns, along with demonstrations.

REGISTER

Windows Azure Compute Architecture Webcast
Wed., March 16, 2011
10:00 AM - 11:00 AM Pacific Time

Monday, March 7, 2011

Now on Kindle: The Windows Azure Handbook, Volume 1: Planning & Strategy

Last week my book, The Windows Azure Handbook, Volume 1: Planning & Strategy, became available (a 300-page print book). This book is now also available as an e-book on Amazon Kindle.

Kindle e-books can be read not only on the Kindle book reader device but also on many PC, phone, and tablet devices - including Windows PC, Mac, iPad, iPhone, Android, BlackBerry, and Windows Phone 7.

Tuesday, March 1, 2011

Book Release: The Windows Azure Handbook, Volume 1: Strategy & Planning

I’m very pleased to announce that my first Windows Azure book is now available, The Windows Azure Handbook, Volume 1: Planning & Strategy. In this post I’ll give you a preview of the book. This is the first in a four-volume series that covers 1-Planning, 2-Architecture, 3-Development, and 4-Management. For information about the book series see my previous post or visit the book web site at http://azurehandbook.com/. The book can be purchased through Amazon.com and other channels.


This first volume is intended for business and technical decision makers and is concerned with understanding, evaluating, and planning for the Windows Azure platform. Here’s how the book is organized:

Part 1, Understanding Windows Azure, acquaints you with the platform and what it can do.

• Chapter 1 explains cloud computing.
• Chapter 2 provides an overview of the Windows Azure platform.
• Chapter 3 describes the billing model and rates.

Part 2, Planning for Windows Azure, explains how to evaluate and plan for Windows Azure.

• Chapter 4 describes a responsible process for cloud computing evaluation and adoption.
• Chapter 5 describes how to lead discussions on envisioning risk vs. reward.
• Chapter 6 is about identifying cloud opportunities for your organization.
• Chapter 7 explains how to profile applications and determine their suitability for Windows Azure.
• Chapter 8 describes how to approach migrations and estimate their cost.
• Chapter 9 covers how to compute Total Cost of Ownership (TCO) and Return on Investment (ROI).
• Chapter 10 is about strategies for adopting Windows Azure.

Here are the chapter introductions to give you an idea of what each chapter covers:

Introduction

This book is about cloud computing using Microsoft’s Windows Azure platform. Accordingly, I have a two-fold mission in this introduction: to convince you cloud computing is worth exploring, and to convince you further that Windows Azure is worth exploring as your cloud computing platform. Following that I’ll explain the scope, intended audience, and organization of the book.

Chapter 1: Cloud Computing Explained

In order to appreciate the Windows Azure platform it’s necessary to start with an understanding of the overall cloud computing space. This chapter provides general back¬ground information on cloud computing. We’ll answer these questions:

• What is cloud computing?
• How is cloud computing being used?
• What are the benefits of cloud computing?
• What different kinds of cloud computing are there?
• What does cloud computing mean for IT?

Chapter 2: Windows Azure Platform Overview

In the previous chapter we explained cloud computing generally. Now it’s time to get specific about the Windows Azure platform. We’ll answer these questions:

• Where does Windows Azure fit in the cloud computing landscape?
• What can Windows Azure do?
• What are the technical underpinnings of Windows Azure?
• What are the business benefits of Windows Azure?
• What does Windows Azure cost?
• How is Windows Azure managed?

Chapter 3: Billing

The Windows Azure platform has many capabilities and benefits, but what does it cost? In this chapter we’ll review the billing model and rates. We’ll answer these questions:

• How is a Windows Azure billing account set up and viewed?
• Is Windows Azure available in my country, currency, and language?
• What is the Windows Azure pricing model?
• What are the metering rules for each service?
• What is meant by “Hidden Costs in the Cloud”?

Chapter 4: Evaluating Cloud Computing

Planning for cloud computing is an absolute necessity. Not everything belongs in the cloud, and even those applications that are well-suited may require revision. There are financial and technical analyses that should be performed. In this chapter we’ll explain how to evaluate cloud computing responsibly. We’ll answer these questions:

• What is the ideal rhythm for evaluating and adopting cloud computing?
• What is the value and composition of a cloud computing assessment?
• What should an organization’s maturity goals be for cloud computing?

Chapter 5: Envisioning Risk & Reward

In order to make an informed decision about Windows Azure you need more than a mere understanding of what cloud computing is; you also need to determine what it will mean for your company. In this chapter we’ll answer these questions:

• How do you find the cloud computing synergies for your organization?
• How do you air and address risks and concerns about cloud computing?
• How will cloud computing affect your IT culture?

Chapter 6: Identifying Opportunities

Some applications and organizational objectives fit cloud computing and the Windows Azure platform well and some do not. This chapter is a catalog of patterns and anti-patterns that can help you swiftly identify candidates and non-candidates even if you are surveying a large portfolio of IT assets. Of course, candidates are only that: candidates. Business and technical analysis is necessary to make ultimate determinations of suitability. We’ll look at the following:

• Which scenarios are a good fit for Windows Azure?
• Which scenarios are a poor fit for Windows Azure?

Chapter 7: Profiling Applications

Applications, like people, are complex entities with many different attributes. In order to determine how good a fit an application is for cloud computing with Windows Azure, you’ll need to consider it from multiple angles and then come to an overall conclusion. We’ll look at the following:

• How do you profile an application?
• How can an application be scored for suitability?
• How should suitability scores be used?

Chapter 8: Estimating Migration

Some applications migrate easily to Windows Azure while others may require moderate or significant changes. Migration should begin with a technical analysis in which the extent of architectural, code, and data changes are determined. Once scoped, migration costs can be estimated and factored into the ROI calculation to determine if a migration makes sense. We’ll answer these questions:

• How is a migration candidate analyzed?
• How is a migration approach determined?
• How can operational costs be optimized in a migration?
• How is the extent of development work estimated?

Chapter 9: Calculating TCO & ROI

Whether or not cost reduction is your motivation for using cloud computing you certainly want to know what to expect financially from the Windows Azure Platform. Once you have a candidate solution in view you can calculate Total Cost of Ownership, Savings, and Return on Investment (if you have collected sufficient information). If you have skilled financial people at your disposal you should consider involving them in your analysis. In this chapter we present simple but revealing analyses anyone can perform that help you see the financial picture. We’ll answer these questions:

• How is TCO calculated for a Windows Azure solution?
• How is savings determined?
• How is ROI calculated?

Chapter 10: Adoption Strategies

Whether your use of Windows Azure is light or extensive, you should certainly be using it for well-defined reasons. A technology wave as big as cloud computing can be a game-changer for many organizations and is worth evaluating as a strategic tool. In this chapter we help you consider the possibilities by reviewing different ways in which Windows Azure can be used strategically by organizations. We also consider the impact it can have on your culture. We’ll answer these questions:

• Are there different levels of adoption for Windows Azure?
• How can Windows Azure be strategically used by IT?
• How can Windows Azure affect your culture?
• How can Windows Azure further your business strategy?

Well, there you have it—The Windows Azure Handbook, Volume 1: Strategy & Planning. I believe this is the only book for Windows Azure that covers business, planning, and strategy. I hope it is useful to organizations of all sizes in evaluating and adopting Windows Azure responsibly.

Introducing The Windows Azure Handbook

I’m excited to introduce my Windows Azure book series, The Windows Azure Handbook. The first volume is available now through Amazon.com and other channels.

Each volume of the series covers a different lifecycle stage and is intended for a different audience:

Volume 1: Planning & Strategy is for business and technical decision makers
Volume 2: Architecture is for architects
Volume 3: Development is for developers
Volume 4: Management is for IT Workers

Volume 1, the yellow book, focuses on planning and strategy and is intended primarily for business and technical decision makers. With the information in this book you'll be equipped to responsibly evaluate Windows Azure, make a business case for it, determine technical suitability for your applications, plan for adoption, and formulate a cloud computing strategy.

Volume 2, the green book, covers architecture and includes design patterns for compute, storage, relational data, networking, communication, security, and applications. (Spring 2011)

Volume 3, the blue book, covers development and includes these topics: programming with Windows Azure compute, storage, database, communication, networking, and security services. (Summer 2011)

Volume 4, the purple book, covers management and includes these topics: operations monitoring, application management, scaling, and billing management. (Fall 2011)

What make the Windows Azure Handbook unique? To quote from the Introduction:

“Most books on cloud computing seem to be either business-focused and general or deeply technical and platform-specific. In my view, either level of focus is myopic: I’m a firm believer that when technology is applied both the business context and the technical context need to be jointly considered and in alignment. I also find the full lifecycle of cloud computing (planning, design, development, management) is rarely addressed in a single work. I see therefore a need and opportunity for a book series that tells the full story about cloud computing with Windows Azure.

“I believe I’m in a unique position to tell that story well. As a Microsoft MVP I’m kept well-informed about where the platform is and where it is going and I’m exposed to industry thought leaders. As general manager of a consulting practice I and my colleagues are helping customers adopt cloud computing in the real world and are in tune with the best practices. My involvement in business activities such as cloud computing assessments has given me insight into the benefits, risks, and trade-offs companies must consider in evaluating and adopting cloud computing. My regular involvement in solution architecture and development allows me to speak about both from a position of hands-on experience. The big picture is a compelling one, and you’ll get a good sense of it from these books.”

You can find out more about The Windows Azure Handbook series on its book site at http://azurehandbook.com/.