O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Running in the Cloud - First Belgian Azure project

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio

Confira estes a seguir

1 de 67 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Anúncio

Semelhante a Running in the Cloud - First Belgian Azure project (20)

Mais de Maarten Balliauw (20)

Anúncio

Mais recentes (20)

Running in the Cloud - First Belgian Azure project

  1. 1.
  2. 2. Running in the CloudChronoRace<br />Maarten Balliauw – RealDolmenE-mail: maarten.balliauw@realdolmen.comBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw<br />
  3. 3. Who am I?<br />Maarten Balliauw<br />Antwerp, Belgium<br />www.realdolmen.com<br />Focus on web<br />ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, …<br />MVP ASP.NET<br />http://blog.maartenballiauw.be<br />http://twitter.com/maartenballiauw<br />
  4. 4.
  5. 5. Agenda<br />Cloud computing?<br />Windows Azure?<br />The ChronoRace case<br />ChronoRace?<br />Infrastructure<br />The project<br />Resources<br />Q&A<br />
  6. 6. What’s in the cloud?<br />Cloud Computing<br />
  7. 7. Cloud computing<br />On-demand self service<br />Standardized access<br />Location independant resource pooling<br />Rapid elasticity<br />Pay per use<br />
  8. 8. IT as a Service<br />Private<br />(On-Premise)<br />Infrastructure<br />(as a Service)<br />Platform<br />(as a Service)<br />You manage<br />Applications<br />Applications<br />Applications<br />You manage<br />Runtimes<br />Runtimes<br />Runtimes<br />Security & Integration<br />Security & Integration<br />Security & Integration<br />Managed by vendor<br />You manage<br />Databases<br />Databases<br />Databases<br />Servers<br />Servers<br />Servers<br />Managed by vendor<br />Virtualization<br />Virtualization<br />Virtualization<br />Server HW<br />Server HW<br />Server HW<br />Storage<br />Storage<br />Storage<br />Networking<br />Networking<br />Networking<br />
  9. 9. What’s in the cloud?<br />Windows Azure<br />
  10. 10. The Windows Azure Platform<br />Windows Azure<br />SQL Azure<br />Windows Azure platform AppFabric<br />Microsoft Codename “Dallas”<br />Microsoft Codename “Sydney”<br />
  11. 11. Windows Azure<br />Flexible application hosting<br />Lights-out service management<br />Provide code & service model, hit ENTER<br />Storage at massive scale<br />Blobs, tables, queues<br />Compute<br />Storage<br />Management<br />
  12. 12. Windows Azure<br />
  13. 13. Storage options<br />Blobs, tables, queues<br />Windows Azure Drive (a.k.a. XDrive)<br />Virtual NTFS volume that can be mounted<br />.vhd format<br />Use existing NTFS API’s<br />Easier migration<br />Stored on blob storage provides quick mount/unmount in other VM<br />
  14. 14. SQL Azure<br />Relational database as a service<br />Highly available, automatically maintained<br />Extension of the SQL Server Data Platform<br />Reporting<br />Data Sync<br />Business Analytics<br />Database<br />
  15. 15. Windows Azure AppFabric<br />Secure connections between services<br />Across organizational boundaries<br />Claims-based access control<br />ServiceBus<br />AccessControl<br />
  16. 16. Service Bus Overview<br />
  17. 17. Microsoft Codename “Dallas”<br />Content brokerage and discovery platform <br />Available as a CTP<br />Microsoft Codename “Dallas”Information Services<br />
  18. 18. Microsoft Codename “Sydney” - Connectivity<br />WINDOWS AZURE PLATFORM<br />ENTERPRISE<br />Data Service<br />Service Bus<br />Access Control Service<br />Code Name “Project Sydney”<br />
  19. 19. North America Region <br />Asia Pacific Region<br />Europe Region<br />N. Europe <br />Sub-region <br />N. Central – US <br />Sub-region <br />E. Asia<br />Sub-region <br />W. Europe <br />Sub-region <br />S. Central - US <br />Sub-region<br />S.E. Asia<br />Sub-region <br />
  20. 20.
  21. 21.
  22. 22.
  23. 23.
  24. 24. What’s in the cloud?<br />Running in the Cloud<br />The ChronoRace case<br />
  25. 25. ChronoRace<br />
  26. 26. ChronoRace<br />Delivering infrastructure for timing sports events<br />Running, biking, triathlon, mountainbike, …<br />Founded 10 years ago, Malmédy, 4 persons<br />Timing of every participant<br />Video footage of every participant<br />PDF certificates for every participant<br />Around 340 events per year!<br />Belgium, Luxemburg, France, Germany, Netherlands, …<br />Small events<br />Large events<br />Dwars door Brugge 8.000 participants<br />Antwerp 10 Miles 17.000 participants<br />20km of Brussels 30.000 participants<br />
  27. 27. What’s in the cloud?<br />Infrastructure<br />The ChronoRace case<br />
  28. 28. Current infrastructure<br />
  29. 29. Google Analytics from Antwerp 10 Miles 2010<br />
  30. 30. Big event…<br />20km of Brussels upcoming! (30/05/2010)<br />Expected 30.000 participants<br />Downloading their certificate 30.000 hits processing a PDF<br />Watching results online 30.000 hits*<br />Having a video online 30.000 x +/- 10MB (= 292 GB)<br />Watching their video 30.000 video views<br />And showing off to family and friends… 30.000 x 10MB x 10 views (avg.) = 2,92 TB bandwidth in 1 day<br />About 35 Mbps<br />Over a 10 Mbps line…<br />But there’s an option to a 100 Mbps line!<br />
  31. 31.
  32. 32. How to overcome these predictable peaks?<br />Make videos only available after a day or 2<br />Many hits to the results page can be handled<br />Videos online during week: traffic spread<br />Invest in streaming?<br />Costly, big capacity only needed for +/- 7 events per year<br />The videos are not the only problem<br />
  33. 33. How to overcome these predictable peaks?<br />A better WAN connection?<br />Costly<br />Currently the server can handle all traffic because of the 10 Mbps cap<br />Buy additional hardware?<br />Costly<br />Estimated use of additional hardware is +/- 7 events per year<br />14 days of required uptime<br />342 days of money burning<br />
  34. 34. “Growing Fast“ <br />“On and Off “ <br />Inactivity<br />Period <br />Compute <br />Compute <br />Average Usage<br />Usage<br />Average<br />Time <br />Time <br /><ul><li>On & off workloads (e.g. batch job)
  35. 35. Over provisioned capacity is wasted
  36. 36. Time to market can be cumbersome
  37. 37. Successful services needs to grow/scale
  38. 38. Keeping up w/ growth is big IT challenge
  39. 39. Complex lead time for deployment</li></ul>“Unpredictable Bursting“ <br />“Predictable Bursting“ <br />Compute <br />Compute <br />Average Usage <br />Average Usage <br />Time <br />Time <br /><ul><li>Unexpected/unplanned peak in demand
  40. 40. Sudden spike impacts performance
  41. 41. Can’t over provision for extreme cases
  42. 42. Services with micro seasonality trends
  43. 43. Peaks due to periodic increased demand
  44. 44. IT complexity and wasted capacity </li></ul>Workloadpatternsoptimalforcloud<br />
  45. 45. What’s in the cloud?<br />The Project<br />The ChronoRace case<br />
  46. 46. Where did it start…<br />Microsoft salesguy is a runner<br />Annoyed by the slow / failing website<br />Decided to give a call<br />ChronoRace interested in the cloud story<br />RealDolmen chosen as partner<br />Already investing heavily in Windows Azure for 1,5 year<br />Mostly building PoC’s to see what fits / what not<br />Experience<br />
  47. 47. Step 1: Identify the possible use case for cloud<br />Obviously: peaks, mostly predicted<br />
  48. 48. Step 2: Identify possible pitfalls<br />Current website<br />VS2003 Web Site<br />Database<br />1 GB or 10 GB?<br />PDF generation<br />32 bit component (Azure is 64 bit)<br />License key requires registry access<br />Streaming<br />Possible from Azure?<br />Directly from storage?<br />Scaling<br />Not automatic on Azure<br />Deployment<br />Site is +/- 300 MB, deploy this every time?<br />Pricing<br />Is this all worth the migration?<br />
  49. 49. Current web site<br />VS2003 Web Site<br />Should be easy!<br />File -> New -> Cloud<br />Add a web application<br />Copy the VS2003 web site in<br />Right click -> Convert to web application<br />Done!<br />
  50. 50.
  51. 51. Current web site<br />VS2003 Web Site in a VS2010 Web Application<br />Would not compile (no namespaces)<br />Migration took some time<br />Add namespace<br />Restructure classes<br />Throw out stuff that was no longer used<br />Actually migration allowed us to get a cleaner application<br />
  52. 52. Database<br />Current database size: around 2,5 GB<br />Squeeze stuff into 1 GB?<br />Data retention<br />Restructure database?<br />
  53. 53. Database<br />Decided to go for 10 GB version<br />Migration<br />Using open-source: SQL Azure Migration Wizardhttp://sqlazuremw.codeplex.com<br />Worked surprisingly good!<br />2 stored procedures could not be migrated<br />Test migration took 7 hours initially!<br />Don’t migrate on your home connection <br />
  54. 54. Database<br />Current website at www.chronorace.be runs on SQL Azure<br />As easy as changing the connection string!<br />After installing SQL Server 2008 R2 client<br />After installing SQL Server 2008 R2 management objects<br />
  55. 55. Database<br />Backups?<br />Do you NEED backups on Azure anyway???<br />Not supported in current version, backups manually via SQL Azure Migration Wizard to local SQL Server<br />One of the upcoming SQL Azure versions will support database backups<br />
  56. 56. PDF generation<br />Using “WebSuperGoo ABCpdf”<br />Requires registry access for the license key<br />Not allowed on Azure<br />We built a small PoC in Development Fabric which worked!<br />Deployment to production learned that this was false optimism <br />Current version: 32 bits<br />Azure: 64 bits<br />We tried to run the non-licensed version on Azure<br />Did not work: author has disabled 64 bits support<br />
  57. 57. PDF generation<br />64 bits version…<br />Decided to keep this on the current web server for now<br />Migrate to an open-source PDF component in the future<br />
  58. 58. Streaming<br />Currently a Flash player<br />Downloads chunks of +/- 1 MB<br />Should work on blob storage!<br />Cheap storage<br />Cheap traffic<br />CDN support<br />API supports downloading chunks<br />
  59. 59. Streaming<br />Getting a chunck took a few seconds for each video…<br />What if a participant watches the video 10 times?<br />Decided to cache the video to compute<br />During the advert that is shown<br />Next view of the video is instant!<br />Demo: http://bit.ly/d8koz6<br />
  60. 60. Scaling<br />Done by doing this:<br />Would be awesome to have this:<br />Not possible!<br />“When” should it scale?<br />“How” should it scale?<br />“Who” / “What” is responsible for scaling?<br /><Instancescount="2" /><br /><InstancesminInstances="3" maxInstances="10" /><br />
  61. 61. Auto-Scaling<br />Auto scaling would be a big benefit<br />During events all 4 people are busy<br />It is the cloud after all? The scale-up/down thing?<br />We decided to build something for that<br />Application should be able to monitor itself<br />Only one instance should be responsible for that<br />
  62. 62. Auto-Scaling – Scaling logic<br />Scaling logic provider uses sensor data to suggest an action (up/fast-up/down/stable)<br />To implement per application<br />Just a suggestion!<br />Scaling logic provider uses sensor data to suggest an action (up/fast-up/down/stable)<br />To implement per application<br />Just a suggestion!<br />
  63. 63. Auto-Scaling<br />Uses all the standard API’s of Windows Azure<br />Master election  Role Environment<br />Performance counters  Diagnostics API<br />Queue length  Storage API<br />Scaling (changing # instances in config)  Management API<br />
  64. 64. Auto-Scaling in ChronoRace<br />Sensor based on concurrent video streams<br />Scales between 2 and 20 instances automatically<br />Hard to verify! The Windows Azure portal is not willing to disclose the number of instances during scale.<br />MMC Snap-In does give useful info!http://code.msdn.microsoft.com/windowsazuremmc<br />
  65. 65. Deployment<br />Site is +/- 300 MB, deploy this every time?<br />Deployment through portal seems to take forever<br />Uploading 300 MB for a very small change is crazy<br />We decided to move images and static content to blob storage and serve it from there<br />Code and dynamic content are on Windows Azure. Making it a 3,5 MB application.<br />
  66. 66. Deployment<br />Deployment can be done in 2 ways<br />“Upgrade”<br />“VIP swap”<br />Website will mostly run on 1 or 2 instances<br />Case 1  upgrade will bring the site down!<br />Process: use VIP swap<br />
  67. 67. Pricing – Current pricing<br />Server lease for 2 servers<br />Including 10 Mbps bandwidth<br />+/- 450 EUR / month<br />
  68. 68. Pricing – Windows Azure<br />Storage<br />30 GB required x $ 0,15 = $ 4,50 / month<br />SQL Azure<br />10 GB database x $ 99,99 = $ 99,99 / month<br />
  69. 69. Pricing – Windows Azure<br />Compute<br />On average 1 instance = $ 43,20 / month<br />Worst case 15 days 3 instances = $ 129,60 / month<br />Traffic<br />3 TB x $ 0,15 / GB = $ 450,00 / month*<br />*will probably be less<br />
  70. 70. Pricing – Windows Azure<br />Estimated worst-case scenario would cost:<br />Current setup: 450 EUR / month<br />Windows Azure worst-case: 590 EUR / month<br />
  71. 71. What’s in the cloud?<br />Summary<br />The ChronoRace case<br />
  72. 72. ChronoRace summary<br />Pitfalls were identified and mostly tackled<br />Except for the PDF generation<br />Most hours spent with VS2003 web site to VS2010 web app<br />Database migration<br />One test run of 7 hours (unattended)<br />Final migration took 1 hour<br />Development using Windows Azure Storage API<br />Max. 1 day spent<br />Website on Azure will be put to test next weekend:<br />20 km of Brussels is D-Day<br />Confident that it will not explode this time<br />
  73. 73. Resources<br />Where do I find more info?<br />
  74. 74. Resources<br />Windows Azurehttp://www.azure.com<br />Steve Marxhttp://blog.smarx.com/<br />PDChttp://microsoftpdc.com<br />My bloghttp://blog.maartenballiauw.be/category/Azure.aspx<br />RealDolmen blogs is running on Azure!http://www.realdolmenblogs.com<br />RealDolmen will be happy to work with you in identifying if cloud computing is beneficial to your applications.<br />Stop by our booth for a chat!<br />
  75. 75. AZUG.BE – Azure User Group Belgium<br />Focus on the Azure Services Platform<br />Community-driven<br />Focus on architecture<br />And development<br />And the business value of Azure<br />www.azug.be<br />
  76. 76. Questions<br />Possibly Answers<br />Q&A Session also later today,check your session schedule<br />or stop by our booth.<br />
  77. 77. Maarten Balliauwhttp://blog.maartenballiauw.be<br />http://twitter.com/maartenballiauw<br />THANK YOU!<br />

Notas do Editor

  • Datacenter pairing!

×