Академический Документы
Профессиональный Документы
Культура Документы
Table of Contents
Windows Azure: Migration Analysis, Strategy, and Planning .......................................................................... 1 Custom E-Commerce Application Redesign and Migration ...........................................................................2 Motivations for Migration to Windows Azure ....................................................................................................4 Usage Patterns and Business Examples ....................................................................................................4 Other Key Benefits and Business Enabling Capabilities .........................................................................5 Migration Business Scenario .................................................................................................................................7 Migration Planning and Considerations ..............................................................................................................8 Technical Considerations ............................................................................................................................8 Business Considerations ..............................................................................................................................8 Migration Topics, Guidance, and Best Practices .....................................................................................9 Payment Card Industry (PCI) Data .............................................................................................................9 Segmenting ....................................................................................................................................................9 Elasticity ........................................................................................................................................................12 Additional Resources ............................................................................................................................................14 Conclusion ..............................................................................................................................................................15
Analysis
Strategy
Planning
To align business needs with cloud capabilities, organizations should investigate Windows Azure cloud features based on the business goals they hope to achieve: To reduce costs, organizations may be able to migrate applications and data storage assets to Windows Azure and more cost-effectively pay for only the computing resources they need. To bring products to market faster, organizations may be able to use Windows Azure rapid deployment capabilities to save time, achieve agility, and become more responsive. To achieve efficiency and mitigate consequences of maintaining unused or
underutilized computing assets, organizations may be able to use Windows Azure to scale up and scale down to gain greater efficiency. To simplify IT management and offload hardware management burdens, organizations may be able to leverage Windows Azure to focus their on-premises resources on key applications and services that differentiate them within their marketmaking them more competitive. To address uneven usage demandswhile retaining a positive customer experience organizations can use Windows Azure to create dynamic elasticity to allow their systems to respond to demand as it occurs.
As organizations adopt a cloud strategy and start to plan migrations, some will start with small, peripheral applications and will use these experiences to test, learn, and discover how to best use cloud capabilities to suit particular needs. Certain applications will stand out as excellent migration candidates for their technical suitability or because of obvious or compelling business reasons for migrationsuch as the need for better scalability. Other applications will
be candidates because their migration is likely to be rapid and uncomplicatedand migration is expected to deliver early benefits. This paper is one in a series of materials designed to help identify specific application architectural patterns and technology typesand to help illustrate specific considerations and suggested approaches for migrating applications with the same or similar patterns.
Web Services
Merchandise Providers
Area Customers
To illustrate this application pattern, we will look at a specific e-commerce applications on-premises architecture, which includes the following elements: Single Geographic Location This organization currently maintains a single geographic location for their on-premises application hosting, web hosting, databases, and web services. Third-Party Integration This organization also maintains a level of integration with 3rd party merchandise providersincluding merchandise listings and inventory.
Business to Business (B2B) Web Services This organization also uses Business to Business (B2B) Web Services connecting to a web services host. Next, we will look at this same application and will explore the motivations for migration to Windows Azure, the underlying business scenario, planning and consideration issues, and finally, Migration Topics, Guidance, and Best Practices.
Windows Azure
Web Services
Application, Website, or other user interface
Merchandise Providers
Area Customers
On and Off
Compile Inactivity Period Average Time Usage
Rapidly Growing
Compile
Predictability Variable
Compile
Unpredictability Variable
Compile
Unpredictable Variability Unpredictable variability usage patterns occur when computing demand spikes suddenly without enough advanced warning to plan for the spike. This demand can be brought about by a prominent announcement, a campaign, or an occurrence.
The two patterns we will focus on for this e-commerce migration scenario are predictable and unpredictable variability. These patterns are very common in e-commerce and apply particularly to businesses that experience seasonal or other (predictable or unpredictable) spikes in demand or traffic: Ticket Sales (Must accommodate both standard and peak usage periods for sporting events, concerts, plays, speakers, etc.) Online Retailers (Must accommodate both standard and seasonal usage demands.) Freight Distributors (Must accommodate for both standard and peak demand.) Government and Non-Governmental Organizations (NGOs) (Must respond to urgent demands, as in the wake of a disaster or other crisis.) Universities (Registration periods create short but significant spikes in usage.) Wireless Providers (Wireless providers must adjust for seasonal peaks due to holidays and other events.) This list is by no means comprehensive, and any organization that deals with inconsistent usage patterns may derive benefit from cloud capabilities.
Integration/Distributed Computing Businesses that maintain an e-commerce front end and need B2B integration can benefit from Windows Azure services and functionalities. These businesses can use Windows Azure features to achieve greater reliability, scalability, and automation to better connect them with merchandisers, distributors, and other B2B stakeholders. Elasticity/Scalability Windows Azure allows for dynamic elasticity, which is the ability to add scale programmatically as demand increases. Dynamic or scheduled elasticity is an ideal response to some of the uneven usage patterns discussed previously. (Elasticity is not possible in an on-premises environment.) For some organizations, the time and effort involved in creating programmatic elasticity may not be warrantedin which case, manual scalability still provides a dramatic advantage over the on-premises model. Additionally, Windows Azure allows for computing costs to drop when demand drops. E-commerce organizations are often subject to demand fluctuations, and the need to scale up is frequently discussed, but organizations can also experience periods of lower demand. On premises, costs dont scale down when demand does; whereas for applications in Windows Azure, costs can drop right alongside usageallowing organizations to save or redirect funds to stay ahead of the curve.
Disaster Recovery/Redundancy/Performance Single location businesses wishing to expand capabilities and resources to gain disaster recovery capacity, greater redundancy, improved performance and uptime can use Windows Azure to achieve these results far more affordably. Costs for establishing a secondary data center go far beyond those associated with purchasing or leasing the location and physical assets, and by the time all required monitoring and customization is implemented, a new data centers costs will likely far exceed the original data centers costs. Using Windows Azure to expand these capabilities affordably supports an organizations need for disaster recovery, redundancy, and performance. Simplified IT Management Offloading some percentage of hardware maintenance allows organizations to focus their IT resources and assets on projects that differentiate them in their marketsprojects that add true value instead of just keeping the lights on. Database Options Multiple Microsoft SQL Azure databases enable segmenting, scaling, and added redundancy. (A single database often cannot be segmented, scaled, started, or stopped in a timely manner and without considerable upfront cost and planning.)
Rapid Deployment The ability to deploy new applications quickly without being constrained by long hardware provisioning timelines allows organizations to respond quickly to changing conditions. Cost Structure There are several important things to note about the Windows Azure cost structure: Operating Expense Instead of Capital Expense - Deploying new resources does not require up-front capital expenditures. Pay as You Go - Because organizations only need to pay for the computing resources and services they use, they can far more accurately align computing capabilities with actual needs. Additionally, organizations gain accounting granularity and transparency. Optimized for Architecture - The Windows Azure cost structure actually rewards good system architecture, and it allows organizations the ability to tailor their applications to achieve greater savings. In addition to these benefits, there are many other ways in which the Windows Azure cloud platform and services can help organizations optimize technology infrastructure and achieve goals.
Predictable Variables
Known Sales Trend 1200 Wasted capacity Wasted capacity Wasted capacity Wasted capacity 1200 1200 Sales 1200 1200 1200 1200 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Month of July 1200 1200 1200 Event Series 1200 1200 1200
Lost Opportunity
On-Premises Data
AppFabric
Client Interface
Service Bus
Technical Considerations
While there are many aspects of migrating a robust e-commerce solution to the cloud, we will explore the following two topics in greater detail: Segmenting Elasticity
in terms of their relevance to the business need or circumstance. In many situations, concerns about geopolitical conditions and data security and sensitivity are primarily the same in Windows Azure as they would be on premises, and similar best practices should be followed; however, it is important for organizations to be comprehensive in their approach. For an introduction to some of the most common cloud computing business considerations, please reference Cloud Optimization Expanding Capabilities, while Aligning Computing and Business Needs at http:// www.microsoft.com/windowsazure/whitepapers/.
Business Considerations
Business considerations unrelated to the architectural structure of an application still need to be reviewed
Segmenting
is to have a central database. In the code sample Segmenting databases can be an increasingly complex effort. The following are some basic principles to follow when segmenting databases for performance, storage, or other reasons. The following section provides detailed guidance related to segmenting based on business department delineation. Segmentation by Department: This method separates data by functional department within a business, which means that a departments performance wont be negatively impacted by other departments. One of the primary methods for implementing a Segmented Data Store by Business Department The following is one method to implement this segmenting process within an application. The class architecture below lays out a simple base class SegmentBase that is inherited by the respective department classes: Marketing, Engineering, and Sales. In the centroidal databases there resides a table that stores the connection information for each department database. This way additional connection information can easily be added whenever additional department database repositories are added. below that retrieves the specific connection per department, the central store is called centroidal. The other databases are then named according to their departments.
The base class implements the constructor which accepts a SQL connection and description string parameter. The specific classes that then inherit from this base class can provide other methods and properties that are specific to the department or repository as needed. The base class is shown below.
A good practice is to provide these connection objects for each department by usage of a factory method pattern as shown below. The idea is that each object is returned based on the needed departmental domain data. The following shows the factory method that connects and then returns all of the specific objects in a list. From there one can derive the appropriate class and any other logic to choose, cache, or otherwise manage the connections based on the specific segment needed.
10
Public class SegmentBase { public SegmentBase(SqlConnection databaseConnection, string description) { Connection = databaseConnection; Description = description; } public SqlConnection Connection { get; set; } public string Description { get; set; } public bool VerifyConnection() { bool connectionWorks = false; try { Connection.Open(); Connection.Close(); connectionWorks = true; } catch { connectionWorks = false; } return connectionWorks; }
} Public static List<SegmentBase> GetSegments() { var segments = new List<SegmentBase>(); using (var entities = new centroidalEntities()) { var connections = from connection in entities.Connections where connection.ConnectionString != string.Empty select connection; foreach (Connection connection in connections) { SegmentBase segmentConnection = null; var sqlConnection = new SqlConnection(connection.ConnectionString); switch (connection.Department) { case Engineering: segmentConnection = new Engineering(sqlConnection, connection.DatabaseName + + connection.Department); break; case Marketing: segmentConnection = new Marketing(sqlConnection, connection.DatabaseName + + connection.Department); break; case Sales: segmentConnection = new Sales(sqlConnection, connection.DatabaseName + + connection.Department); break;
} }
segments.Add(segmentConnection);
} }
return segments;
11
Segmentation by Date or Other Parameters: Segmentation by date or other criteria such as table, load-balanced unique identifier, or custom tree index is accomplished in much the same way as segmentation by department. The particular segmentation structure will be selected based on the performance requirements of the application and the organization. Whatever the elected criteria, database segmentation can be an important approach for gaining application performance.
programmatic elasticity can present a tremendous opportunity for differentiation and subsequent competitive advantage. Whenever dynamic elasticity is the goal, the process will be unique to the organization and application, and the needs of the business should be clearly understood in order to help guide the development efforts. To achieve elasticity in response to either predictable or unpredictable variability, monitoring is the key to functional scaling movement in either direction. Even during up or down movement, monitoring at various levels of the Windows Azure Platform should be used to assure reasonable instance scaling increases or decreases. This precise monitoring can help to set the schedule, or in the case of unpredictable variability, it can indicate when and in which direction the scaling should occur.
Elasticity
Achieving programmatic or dynamic elasticity can be a substantial undertaking, so for some organizations the ability to scale up and down manually to meet expected demand will be more than sufficient; however, for organizations where automating the scaling process is very important, creating
12
Windows Azure Monitoring Within Windows Azure, it is possible to monitor metrics such as throughput, website analytics, and compute utilization. These key indicators will dictate directional movement to attain efficient elasticity. Additionally, the extent of monitoring will dictate the accuracy of elastic control, trending, and management over time. So extending monitoring capabilities to as many levels as is reasonable will only enhance the systems accuracy in scaling up or down. General Monitoring Other indicators can also be monitored programmatically or manually to facilitate specific scale movement for cloud applications. These indicators include social media, which can provide a change in social response to an ad campaign, alteration of site interactions, or other elements that could affect the need to scale
up or down. These other indicators are not always evident during the development or migration phase but could be discovered during the ongoing operation of the cloud application. Even though these other indicators are peripheral to Windows Azure monitoring, these general indicators are often just as important. The following table shows how system demand might be monitored and how instances can programmatically be added or subtracted when usage thresholds move from low to med to high and to very high and back. The monitoring time periods, demand thresholds, and load categorizations would all be determined based on the needs of the application and of the organization, and depending on the application design, the instances added might be Web Roles or Worker Roles.
Instance Scale Time 1/1/10 - 07:00 1/1/10 - 08:00 1/1/10 - 09:00 1/1/10 - 10:00 1/1/10 - 11:00 1/1/10 - 12:00 1/1/10 - 13:00 1/1/10 - 14:00 1/1/10 - 15:00 1/1/10 - 16:00 1/1/10 - 17:00 1/1/10 - 18:00 Demand Peak 400-450 500-525 525-550 1100-1250 600-700 500-525 525-550 1100-1250 1200-2000 1200-2000 525-550 400-425 Load Category Low Med Med High High Med Med High Very High Very High Med Low Instances 2 3 3 4 4 3 3 4 6 6 3 2 _ _ + + _ + + Scale
13
Instances
7 6 5
Demand
Instances Scale
2500 2000 1500 5 4 3 1000 2 500 0
Instances
14:00 15:00
16:00
17:00
18:00 19:00
Time
For more information about creating dynamic elasticity and to view code samples, please reference the following MSDN resources: http://code.msdn. microsoft.com/azurescale/Release/ProjectReleases. aspx?ReleaseId=4167
please reference the following MSDN resources: http://code.msdn.microsoft.com/azurescale/ Release/ProjectReleases.aspx?ReleaseId=4167. Business Considerations Whitepaper: To better understand business considerations related to Windows Azure migrations, please review Cloud Optimization Expanding Capabilities, while Aligning Computing and Business Needs - A framework for making business decisions about cloud computing at http://www.microsoft.com/windowsazure/whitepapers/. Additional Whitepapers: To read additional whitepapers on Windows Azure, please visit http://www.microsoft. com/windowsazure/whitepapers/. Windows Azure Products and Pricing: For more information about Windows Azure Products and Pricing, please visit http://www.microsoft.com/ windowsazure/pricing/.
Additional Resources
Microsoft SQL Server and Microsoft SQL Azure Compatibility: For information about Microsoft SQL Server and Microsoft SQL Azure compatibility, please visit http://msdn.microsoft.com/en-us/library/ ff394115(v=MSDN.10).aspx. Microsoft SQL Azure Migration Wizard: To access the Microsoft SQL Azure Migration Wizard, please visit http://sqlazuremw.codeplex.com/. Dynamic Elasticity: For more information about creating dynamic elasticity and to view code samples,
Demand
14
Conclusion
As organizations think about migrating applications to Windows Azure, it is critical that they understand the problems they are trying to solveboth from a business and from a technology standpoint. A wellconceived application with a clean, solid architecture can expand capabilities and reduce costs dramatically when migrated to Windows Azure; whereas a poorly designed application will be no more efficient in the cloud than it will be on premises. All of the key elements of strong application design apply in the cloudbut if anythingthey are even more important. In this example, the e-commerce business we described would gain tremendous benefit from migrating to Windows Azure and enabling elastic scaling capabilities. Having an e-commerce system that can grow and shrink with demandallowing the organization to pay for additional resources only when they need themwould enable rapid growth without sacrificing customer experiences or profitability. By understanding the business conditions they need to respond to, this organization can use Windows Azure to gain a competitive advantage. And while not all migrations will be simple, cloud computing with Windows Azure presents tremendous opportunity. For many organizations, learning to design or modify applications to take advantage of the range of new options available to them with Windows Azure provides a unique opportunity to move ahead and create the differentiation they need to stand out within their industry. Organizations that see the great opportunity that Windows Azure affords will want to make Windows Azure cloud computing education within their organization a priority and will want to support their development teams efforts to use the Windows Azure Platform and services creatively to answer their organizations most pressing business needs. For developers, Windows Azure provides an exciting new opportunity to add value within an organization. By understanding both organizational goals and pain points, developers can now leverage cloud capabilitiesalong with their existing skillsetto respond to organizational needs with viable, costeffective solutions.
Acknowledgments: Logic20/20, Inc. recognizes the following individuals for their significant contributions to this paper: Lisa Beliveau, Writing; Sacha Stjepanovic and Amit Kaushal, Content Research and Visual Concepts; Brennan Fee, Technical Concepts and Guidance; Jodi Sherwood, Graphic Design; Elaine Porterfield, Editing; Anders Westby, Management of Project Concept and Design.
The document entitled Windows Azure Application Profile Guidance, Custom E-Commerce (Elasticity Focus) Application Migration Scenario is third party owned and authored material and is provided to you as a courtesy. Microsoft Corporation provides this document to you, on behalf of the third party, for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS THIRD PARTY-PROVIDED DOCUMENT. Logic20/20, Inc. acknowledges the support of Microsoft Corporation, which made possible some of the research presented in this white paper. The views and opinions expressed in this article are those of Logic20/20, Inc., and do not necessarily reflect the position of any other party including, but not limited to, Microsoft Corporation. This white paper is for informational purposes only. The information contained in this document is deemed reliable, but is not guaranteed. Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred. Logic20/20, Inc. MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Without limiting any rights under copyright, no part of this document may be reproduced, stored in, or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express prior written permission of Logic20/20, Inc. Logic20/20 and the Logic20/20 logo are trademark(s) of Logic20/20, Inc. All other trademarks are trademarks of their respective owners. 2010 Logic20/20, Inc. All rights reserved.