ArnonRotem-Gal-OzVP Product Deliverywww.codevalue.netMigrating Applications to Azure Cloud
Azure migration is a porting projectGap AnalysisRisk ReductionCost Analysis   Migration
 Choosing a porting model
Web sites migrate into web rolesWeb RoleWorker RoleVM Role
Moving web sites to Azure is not very different then moving them to a web-farm
Can’t use Web-sites …Must use web applications (VS will port for you)
Full IIS vs. Hosted Web Core Multiple sites or virtual applications activation of WCF services over non-HTTP transportsSimple, less resources
Tip: Enable Full IIS    <Sites>      <Site name="Web">        <Bindings>          <Binding name="Endpoint1" endpointName="Endpoint1" />        </Bindings>      </Site>    </Sites>Add Sites to the csdef file….
Tip: Shy away from session stateASP.NET cache is not shared between instances as wellMove session to SQL azureVelocity for Azure is coming later in the yearYou can use memcached meanwhile
Tip: Move configuration from app.config/web.configChanges in web.config – mean redeploymentMove
Tip: native code ISAPI filters are tricky to import…Consider rewriting
Can you Azure this?<html> <head><title>Hello World PHP</title></head> <body> <?phpecho 'Today is '. date('Y-m-d') ."\n"; ?> </body> </html>
Add a Webrole.config…<?xml version="1.0" encoding="utf-8" ?><configuration><system.webServer><fastCgi><applicationfullPath="%RoleRoot%\approot\php\php-cgi.exe"/></fastCgi></system.webServer></configuration>…and enable native code in the .csdef<WebRolename="WebRole"enableNativeCodeExecution="true
Stateless services Web RoleWorker RoleVM Role
Run under full IIS to get scale out and management capabilities Service 1Service 1Service 2Service 2Service 3Service 3Web Role (full IIS)Web Role (full IIS)
Tip: Make your WCF accessible to silverlight clients <?xml version="1.0" encoding="utf-8" ?><!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"><cross-domain-policy><allow-http-request-headers-from domain="*" headers="*"/></cross-domain-policyDrop crossdomain.xml in the root directory of the WebRole
Stateful services/ “semi-stateful” services Web RoleWorker RoleVM Role
VM Role vs. Worker Role – another lookVM role you can do anything but things are not persisted VM role needs manual maintenance (e.g. upgrades to OS)
Worker Role includes facilities to make migration simplerCloudDriveMapping logs to table storage
Tip: pay attention to how you configure your loggingBy the way this setup cost 5.25$ per year (per instance and just for the transactions)
Lavaflow Appshttp://www.antipatterns.com/lavaflow.htm
The lavaflow apps migrate into VM roleWeb RoleWorker RoleVM Role
Don’t COM around here no more(can’t update the registry)Use COM+ and manifest / Native C++Wrap with WCF host
Db3Archive(Table Storage)…NT ServiceIISMigrated SQL CLR CodeVM RoleNT ServiceDb1(SQL Azure)Db2(SQL Azure)Db3(SQL Azure
Getting Azure’s SLA means at least 2 instancesMust make sure app can “scale” to two computers – even for VM role
Tip: Why not host your own SQL?Disks partitioning is  unknown and does not come with an SLA
Not guaranteed to be persistent
Need to build availability on top SQL Migration Wizard
Tip: SQL Retry SQL Connections: Retry on failureConnections can drop for variety of reasonsIdlenessTransient (network) errorsIntentional throttlingFirst step: reconnect immediatelyHandles idleness- and transient-disconnectsGateway handles connection retry for appConnections attempted for ~30s before failureWhat to do on connection failure?Wait (10 seconds), then retry Change your workload if throttled
Backup & Restore
Existing apps were developed in an age of abundance in resourcesCloud apps should be more cost aware
What else?Monitoring Application Lifecycle Management (including system & performance testing) Archiving Authentication and authorization (between tiers as well as of users)CDNsCharging modelConfigurationData Access LayerData encryption Data partitioning Data storage and transactions Dependencies and 3rd party components Deployment, continuous integration & automationDiagnostics, logging & instrumentation Elasticity (dynamic, scheduled, or manual) Geographical co-locationIdempotencyImport/export routines Message security Message size Multi-tenancyNetwork latency Page weightReporting Session state SLAs (availability, performance, etc) SQL features Windows Services & batch jobshttp://blogs.msdn.com/b/simonince/archive/2010/04/13/checklist-discussing-an-azure-migration.aspx
E.g. Can’t host SMTP server in the cloudCan open TCP connection from Azure to the outside world … (and find a SMTP server)
e.g. remember Authentication with ACSSlide by Alik Levin
LinksTCO calculator http://www.microsoft.com/windowsazure/economics/Azure Migration Wizard - http://sqlazuremw.codeplex.com/http://blogs.msdn.com/b/windowsazure/archive/2010/12/02/new-full-iis-capabilities-differences-from-hosted-web-core.aspxCloudoscope – http://www.cloudvalue.com

Azure migration

  • 1.
  • 2.
    Azure migration isa porting projectGap AnalysisRisk ReductionCost Analysis Migration
  • 3.
    Choosing aporting model
  • 4.
    Web sites migrateinto web rolesWeb RoleWorker RoleVM Role
  • 5.
    Moving web sitesto Azure is not very different then moving them to a web-farm
  • 6.
    Can’t use Web-sites…Must use web applications (VS will port for you)
  • 7.
    Full IIS vs.Hosted Web Core Multiple sites or virtual applications activation of WCF services over non-HTTP transportsSimple, less resources
  • 8.
    Tip: Enable FullIIS    <Sites>      <Site name="Web">        <Bindings>          <Binding name="Endpoint1" endpointName="Endpoint1" />        </Bindings>      </Site>    </Sites>Add Sites to the csdef file….
  • 9.
    Tip: Shy awayfrom session stateASP.NET cache is not shared between instances as wellMove session to SQL azureVelocity for Azure is coming later in the yearYou can use memcached meanwhile
  • 10.
    Tip: Move configurationfrom app.config/web.configChanges in web.config – mean redeploymentMove
  • 11.
    Tip: native codeISAPI filters are tricky to import…Consider rewriting
  • 12.
    Can you Azurethis?<html> <head><title>Hello World PHP</title></head> <body> <?phpecho 'Today is '. date('Y-m-d') ."\n"; ?> </body> </html>
  • 13.
    Add a Webrole.config…<?xmlversion="1.0" encoding="utf-8" ?><configuration><system.webServer><fastCgi><applicationfullPath="%RoleRoot%\approot\php\php-cgi.exe"/></fastCgi></system.webServer></configuration>…and enable native code in the .csdef<WebRolename="WebRole"enableNativeCodeExecution="true
  • 14.
    Stateless services WebRoleWorker RoleVM Role
  • 15.
    Run under fullIIS to get scale out and management capabilities Service 1Service 1Service 2Service 2Service 3Service 3Web Role (full IIS)Web Role (full IIS)
  • 16.
    Tip: Make yourWCF accessible to silverlight clients <?xml version="1.0" encoding="utf-8" ?><!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"><cross-domain-policy><allow-http-request-headers-from domain="*" headers="*"/></cross-domain-policyDrop crossdomain.xml in the root directory of the WebRole
  • 17.
    Stateful services/ “semi-stateful”services Web RoleWorker RoleVM Role
  • 18.
    VM Role vs.Worker Role – another lookVM role you can do anything but things are not persisted VM role needs manual maintenance (e.g. upgrades to OS)
  • 19.
    Worker Role includesfacilities to make migration simplerCloudDriveMapping logs to table storage
  • 20.
    Tip: pay attentionto how you configure your loggingBy the way this setup cost 5.25$ per year (per instance and just for the transactions)
  • 21.
  • 22.
    The lavaflow appsmigrate into VM roleWeb RoleWorker RoleVM Role
  • 23.
    Don’t COM aroundhere no more(can’t update the registry)Use COM+ and manifest / Native C++Wrap with WCF host
  • 24.
    Db3Archive(Table Storage)…NT ServiceIISMigratedSQL CLR CodeVM RoleNT ServiceDb1(SQL Azure)Db2(SQL Azure)Db3(SQL Azure
  • 25.
    Getting Azure’s SLAmeans at least 2 instancesMust make sure app can “scale” to two computers – even for VM role
  • 26.
    Tip: Why nothost your own SQL?Disks partitioning is unknown and does not come with an SLA
  • 27.
    Not guaranteed tobe persistent
  • 28.
    Need to buildavailability on top SQL Migration Wizard
  • 29.
    Tip: SQL RetrySQL Connections: Retry on failureConnections can drop for variety of reasonsIdlenessTransient (network) errorsIntentional throttlingFirst step: reconnect immediatelyHandles idleness- and transient-disconnectsGateway handles connection retry for appConnections attempted for ~30s before failureWhat to do on connection failure?Wait (10 seconds), then retry Change your workload if throttled
  • 30.
  • 31.
    Existing apps weredeveloped in an age of abundance in resourcesCloud apps should be more cost aware
  • 32.
    What else?Monitoring Application LifecycleManagement (including system & performance testing) Archiving Authentication and authorization (between tiers as well as of users)CDNsCharging modelConfigurationData Access LayerData encryption Data partitioning Data storage and transactions Dependencies and 3rd party components Deployment, continuous integration & automationDiagnostics, logging & instrumentation Elasticity (dynamic, scheduled, or manual) Geographical co-locationIdempotencyImport/export routines Message security Message size Multi-tenancyNetwork latency Page weightReporting Session state SLAs (availability, performance, etc) SQL features Windows Services & batch jobshttp://blogs.msdn.com/b/simonince/archive/2010/04/13/checklist-discussing-an-azure-migration.aspx
  • 33.
    E.g. Can’t hostSMTP server in the cloudCan open TCP connection from Azure to the outside world … (and find a SMTP server)
  • 34.
    e.g. remember Authenticationwith ACSSlide by Alik Levin
  • 35.
    LinksTCO calculator http://www.microsoft.com/windowsazure/economics/AzureMigration Wizard - http://sqlazuremw.codeplex.com/http://blogs.msdn.com/b/windowsazure/archive/2010/12/02/new-full-iis-capabilities-differences-from-hosted-web-core.aspxCloudoscope – http://www.cloudvalue.com
  • 36.
    IllustrationsAll illustrations fromiStockphotoexcept:Slide 3 John Nyberg http://www.sxc.hu/photo/1329579Slide 18 http://www.majorlycool.com/item/beautiful-but-deadly-lava-flowSlide 26 http://www.sxc.hu/photo/1212823Slide 28 http://www.sxc.hu/photo/1316747

Editor's Notes

  • #3 InterviewsArchitecture &amp; design reviewAssessment tools (e.g. SQL Azure Migration wizard, TCO calculator)