43
How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation AZR312

How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Embed Size (px)

Citation preview

Page 1: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

How to Move and Enhance Existing Apps for Windows AzureTom Fuller, Purush Vankireddy, Greg VarverisField and Service EngineeringMicrosoft Corporation

AZR312

Page 2: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

This Session Is…

Your cloud atlasA long term path to business agility via the cloud

Good BetterBest

A hybrid success storyA pragmatic plan for getting to PaaS

Page 3: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Your Cloud Atlas

Tom FullerPremier Field EngineeringMicrosoft

Navigating All Things ‘Cloud’

Page 4: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

The JourneyM

arc

h

201

0

Novem

ber

20

10

Jun

e

201

2

Marc

h

201

1

Jan

uary

2

01

2

"This is the bet for the company, … for the cloud, we're all in.“ -Steve Ballmer

SDK 1.3 Released

July

2

01

1

VM Role and Azure Connect Beta

Novem

ber

201

1

SDK 1.6 Released

Field and Services Engineering partner to migrate MSDN/TechNet

Field Engineering releases offerings to assist in moving to PaaS

Field Engineering begins supporting IaaS customer previews

Field and Services Engineering begin working on MSDN/TechNet migration to IaaS

Windows Azure IaaS Era Begins

Page 5: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Beyond Public Cloud

Managed public clouds != happiness

Bare Metal

Private Virtualized

Hybrid

Specialized

Non-VirtualUltra Performant

Compliance ConstrainedPre-InvestedOn-Prem Infrastructure Bound

Niche NeedContinuity and RecoveryIncreasing Reach

Page 6: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

What is a Private Cloud?

Shift your datacenter to a single compute ‘cloud’Key Characteristics

Pooled ResourcesSelf-ServiceElasticUsage Based

Page 7: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Breaking Down Walls

On-Premise applications tend to be

Dependent

Windows Components (DTC, WAS, COM+, etc.)

Complicated

Not Constraint Friendly (Storage Limits, Rigid Auth, etc)

Knowledge Leak IssuesAuthn/Authz InfrastructureWindows Software + License (ex. Sharepoint)

Established User Base

Scaling arch is vertical

Page 8: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

All About the Apps

Three typical solution architectures

Geo-Distributed Service

Public Facing Website

Intranet LOB Application

No data privacy or compliance Issues

Depends on specialized Windows Server Infra. (ex. DTC, AD)

Usage patterns map well to the cloud

High data storage requirements

No complex dependenciesStateless design for UI TierHigh scale and elasticity demands

No data privacy or compliance Issues

Infra. dependencies can be automated

Trivial to move toward Statelessness and high ResiliencyPerformance is key

Page 9: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

App #1: Inventory Management (Centralized)

User (Chicago)

LB

Existing Centralized On

Premise Architecture

Product Inventory

Service (1)

Product Inventory

Service (n)

Central Inventory

User (Los Angeles)

User (Orlando)

Branch Inventory (Los Angeles)

Branch Inventory (Chicago)

Branch Inventory (Orlando)

Requires 2-Phased Atomic

Transaction

Page 10: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

App #1: Inventory Management (Distributed)

Inventory Service

(1)

User (Los

Angeles) LB

Inventory Service

(n)

User (Orlando)

Inventory Service

(1)

LB

Inventory Service

(n)

LB

Inventory Service

(1)

Inventory Service

(n)

User (Chicago)

Branch Inventor

y

Central Inventor

y

Branch Inventory

Central Inventory

Branch Inventory

Central Inventory

! No Distributed Transaction Coordinator

Available in PaaS Today!

!

Page 11: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Why Forklift?

Just make it work baby

Triggers Privacy Options

Usage ChangingHardware RefreshingCapacity Exceeded

Retain Control VM MobilityExtend your DC via VPN

Use your Windows SKUs

Move Non-Sensitive Components

Missing Platform Features

Page 12: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

The Distributed Transaction Coordinator

What is it?Part of Windows since Win2K (could even be added to NT4)Distributed Tx Coordination for COM and .NET

Why does it require IaaS?Typically uses windows integrated authRequires stateful log fileWindows Firewall modifications

Legacy solutions depend on itHeterogeneous Resource ManagersCOM+

Page 13: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

demo

Tom FullerPremier Field EngineeringMicrosoft

IaaS Features Enable DTC

Page 14: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Summary

An overview of ‘cloud’ paths

Looked at 3 types of solutions to move

Reviewed how IaaS helps you get to the cloud

This was good … how could it be better?

Page 15: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

MSDN/TechNet

Purush VankireddyDirector of Service EngineeringMicrosoft

A Hybrid Success Story

Page 16: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Moving a Public Facing Website

The world of Enterprise Platform Experience (EPX)

Scope Commitments

Priorities

Largest developer and ITPRO network for Microsoft

Over 50M unique visitors / 300M page views

Over 2.8 TB content

Over 600 physical hosts

30 releases per month

99.9% availability

3 sec or less response time

SLA compliance of over 90%

Scale and agility

Cost efficiencies

Innovation and new technologies

Page 17: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Why Cloud?

Cloud impact on EPX

Agility Manageability

Hosting

Launch readiness

Engineering investments

Fail fast and learn

Efficient provisioning

Increased utilization > 50%20% cost reduction

Reduce labor

Deployments and monitoring

Dynamic scaling

Page 18: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Windows Azure Migration Goals

No Architectural/ Code changes

Performance = on-prem hosted

Manageability and operability

Dynamic scaling and geo redundancy

Page 19: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

App #2: MSDN/TechNetUser

LB

Web Front End

(1)

Web Front End

(2)

Web Front End

(n)Log Aggregator

SQL Front

End (1)

SQL Front

End (2)

SQL Front

End (n)

Publishing Tools

DistributorPublisher

4 TB

Build Services

LB

Existing On Premise

Architecture Bursting and Hosting in Windows

Azure

Web Role (n + 1)

Web Role (n + 2)

SQL Front End (n + 1)

SQL Front End (n + 2)

Web Role (n)

SQL Front

End (n)

4 TB

4 TB

4 TB

4 TB

4 TB

4 TB

LB

Future State: Everything in

PaaS/IaaS

Web Front End

(1)

Web Front End

(2)

Web Front End

(n)

SQL Front

End (1)

SQL Front

End (2)

SQL Front

End (n)

4 TB

4 TB

4 TB

Log Aggregator

Publishing Tools

4 TB

Build Services

Distributor

Publisher

User

Page 20: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

demo

Purush VankireddyDirector of Service EngineeringMicrosoft

TechNet Database on IaaS

Page 21: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Performance Metrics for both PaaS and IaaS

Site Migration Performance Criteria• Start Render Time: PaaS / IaaS delta <1second• Finish Render Time: PaaS / IaaS delta <1second

Technet Sharepoint Home

Script Center Home Page

Internet Explorer Homepage

Technet Exchange Server

Technet Homepage0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

PaaS / IaaS

Paas/On-Prem Iaas

Page fi

nis

h r

ender

tim

e n

seco

nds

Page 22: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Summary

This was great … can it get any better?

Completed Migration in 3 Months

80 instances added for Win8 beta!

Learning curve smaller than expected!

Connectivity is critical!

Deployments & Monitoring

Page 23: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

The End State

Greg VarverisPremier Field EngineeringMicrosoft

Moving directly to PaaS

Page 24: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Moving directly to PaaS

Simple

Stateless by design

Complex

Code is incompatible as is (data access, IO, stateful, etc…)Environment and config highly specialized

Few dependencies

Vanilla environment configRuntime shared and trends unknown

Platform constraints a non issue

Page 25: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

App #3: Expense Report Application

User

LB

Existing Siloed On Premise Architecture

Expense Web UI (1)

Expense Web UI (n)

Expense Repository

All Operations In Process and All Data persisted in a

single DB

Expense Web UI (1)

Expense Repository

Image Resizer (1)

Receipt Storage

LB

Image Resizer (n)Expense Web

UI (n)

Image Resizing Queue

Move and Enhance

Application to use pure PaaS

Split up processing for scale and cost

reduction

Page 26: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Why move this app?

Is it really worth it?

Agility Cost

Expense reports filed at end of month

Managed OS servicing and high availability

Enable global workforce

Data storage of receipts for 7 years

Licenses and maintenance costs folded into subscriptionDR built into the platform

Page 27: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Environment

OverallGAC’d assembliesCOM objects

IISWebsites and application pools mostly use defaultsCustom ISAPI filters or HTTP ModulesUse startup scripts/OnStart method to make changesWindows Authentication

Page 28: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Code

Most code can remain unchanged … except

Stateful Non-Resilient

Dependent

Registry Access

File IO

Data Access (Try/Catch/Retry)

Windows Auth Infrastructure

Legacy .INI files

Hardcore Networking

Unhandled ExceptionsIn Memory State

Mishandled

Page 29: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Code – Data Accesspublic static SqlDataReader ExecuteDataReader(SqlCommand command, CommandBehavior commandBehavior, SqlRetry retry){ SqlDataReader reader = null; int retryCount = 0; while (retry.Retries > 0){ try{ reader = command.ExecuteReader(commandBehavior); break; } catch (SqlException ex){ if (!IsRetryCapable(ex)) throw;

retry.Retries--; retryCount++; if (retry.Retries == 0) throw new ApplicationException("Failed to execute command. Max retries reached.", ex);

int sleepTime = (int)Math.Pow(retry.Retries + 1, 2.0) * retry.RetryLag; if (sleepTime > retry.MaxSleep) sleepTime = retry.MaxSleep; else if (sleepTime < retry.MinSleep) sleepTime = retry.MinSleep;

Thread.Sleep(sleepTime); } } return reader;}

private static bool IsRetryCapable(SqlException sqlException){ foreach (SqlError error in sqlException.Errors) { switch(error.Number) { case 40197: return true; case 40501: return true;} } return false;}

Page 30: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Runtime

On Premise Environment != Windows Azure Environment

Understand the loadS

tep 1

Optimize

Ste

p 2

Compare to VM sizes

Ste

p 3

Deploy, Test, Repeat

Ste

p 4

Page 31: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Understand the loadIIS Logs (Requests/Hour)

Server CPU (Overall)

Website traffic is typically

cyclical

IIS CPU (w3wp.exe)

Impacted by Virus Scanners

and other processes

IIS CPU le

ss

than Overall

CPU

Page 32: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Optimize app/site

Clean things up, you’re paying for it!

Web Sites Background Workers

HTTP 302: Causes extra requestsHTTP 304: More than 1 request for unchanged resourceHTTP 404: Unnecessary requests taking CPU

HTTP 500: High volumes can negatively impact CPU/Memory

Unhandled exceptions cause recycle

Async programming is your friend

Purge or Archive stale logs and data

Page 33: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Tools of the tradeSQ

L A

zure

Mig

rati

on

W

izard • SQL Schema and Object

Analysis• SQL Azure Script Generation• SQL Azure Data Migration• http://bit.ly/17k4s0

Mic

roso

ft A

ssess

ment

and

Pla

nn

ing T

oolk

it f

or

Win

dow

s A

zure

Pla

tform • Environment Inventory

• Evaluate applications• Stack Rank Applications• TCO-ROI Analysis• Plan for the migration• http://bit.ly/e6XLpH

Page 34: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Windows Azure Migration Assessment

• Discovers a complete application environment.• Over 30 .NET code analysis check items to

identify specific lines that need to be changed before migrating.

• Over 200 checks of your SQL database and SQL related configuration.

• Over 50 points of analysis intended to identify configuration that will need to be pushed to the cloud.

• Complete runtime analysis and recommendations to improve performance once on Windows Azure

Features

Page 35: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

demo

Greg VarverisPremier Field EngineeringMicrosoft

Direct to PaaS with confidence

Page 36: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Related Content

AZR314 – Migrating Applications to Windows Azure Virtual Machines

MSDN/TechNet Whitepaper (http://bit.ly/Nw1uNP)

AZR201 – Windows Azure IaaS and how it works

Inventory Service Source Code (http://bit.ly/L3OgYq)

Find Tom at developertofu.com (@DeveloperTofu)

Find Greg at samuraiprogrammer.com (@varveris)

MSDN/TechNet Case Study (http://bit.ly/NFelL0)

Page 37: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Summary

Good Best

Better The time is now!

Page 39: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Resources

Connect. Share. Discuss.

http://northamerica.msteched.com

Learning

Microsoft Certification & Training Resources

www.microsoft.com/learning

TechNet

Resources for IT Professionals

http://microsoft.com/technet

Resources for Developers

http://microsoft.com/msdn

Page 40: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

Complete an evaluation on CommNet and enter to win!

Page 41: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

MS Tag

Scan the Tagto evaluate thissession now onmyTechEd Mobile

Page 42: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to

be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS

PRESENTATION.

Page 43: How to Move and Enhance Existing Apps for Windows Azure Tom Fuller, Purush Vankireddy, Greg Varveris Field and Service Engineering Microsoft Corporation