Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Moving Cloud from Hype To Reality


Published on

I delivered this talk at PHP-Tek 12 in Chicago in May 2012.

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Moving Cloud from Hype To Reality

  1. 1. Mark Brown Community Manager Windows AzureMicrosoft Corporation @markjbrown
  2. 2. • What is the cloud/characteristics• Differences between cloud and hosting• Why makes the cloud possible today?• Considerations for building cloud apps• IaaS Offerings• PaaS Offerings
  3. 3. What is the Cloud? Place to run apps, store data, and more Offers self-service provisioning of resources Provides granular, elastic allocation of resources Charged for the resources you use
  4. 4. Cloud Characteristics Provides high reliability Runs on commodity hardware Should allow for elasticity Should provide economies of scale Resources Cost
  5. 5. From Hosting to Cloud ComputingCapability Hosting Cloud Capacity Reserved On Demand Payment Per Month Per Hour Provisioning Managed Self-Service
  6. 6. We’ve had hosting forever.What has changed?
  7. 7. Bandwidth
  8. 8. Want to stream a Movie in 1998? US Internet Transit Prices per Mbs$1,400$1,200 $270$1,000 $800 $600 per Mbs $400 $200 .05₵ $0 2003 2006 2002 2005 2009 2001 2004 2010 1998 2000 2011 2008 2007 2012 1999
  9. 9. There’s more bandwidth too Average bitrates for streaming media40003500 90x300025002000 Avg BitRates15001000 500 0 1998 2003 2007 2011
  10. 10. Hardware
  11. 11. Storage Prices252015 $/GB10 50 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
  12. 12. Memory Prices Cost for RAM $/MB1.2 10.80.6 $/MB0.40.2 0 2000 2001 2002 2003 2004 20052006200720082009 2010 2011 2012
  13. 13. Virtualization
  14. 14. Virtualization 2000 – Free BSD jails released 2001 – VMWare first server virtualization 2003  Xen: first open source x86 hypervisor  Microsoft releases Virtual PC for Windows 2006 –  VMWare Server offered for free  Microsoft: Virtual PC offered for free  Microsoft – Xen Hypervisor compatibility
  15. 15. REST
  16. 16. REST/Services Simplified managing resources Provisioning:  via a browser  inside your app Monitoring and management Makes self-service possible Final piece that ties it altogether
  17. 17. Before the Cloud. Could I… Create an iPhone app that could support exponential user growth? Do big data or scientific computing without investing in a massive data center? Create the next hot game on Facebook? YouTube Blog:  Today 72 hours of video are uploaded to the site every minute Could NetFlix or YouTube even exist?
  18. 18. Insane user growth Instagram Users450000004000000035000000300000002500000020000000 Users 1500000010000000 5000000 0 Oct Dec Feb Apr Jun Sept Nov Jan Mar May 2010 2010 2011 2011 2011 2011 2011 2012 2012 2012
  19. 19. 3 engineers + Cloud• 100+ instances running: – 3 nginx load balancers – 25 Django app servers – 12 hot Postgres, 12 replica – Redis, memcached, solr, workers, monitor, etc.• Not possible with traditional hosting or on- premise!!!
  20. 20. Test Lab Utilization12010080604020 0 Jan Feb Mar Apr May June July Aug Sep Oct Nov Dec Jan
  21. 21. How Many Servers do I buy? Utilization120 This Many!!!10080604020 0 Jan Feb Mar Apr May June July Aug Sep Oct Nov Dec Jan
  22. 22. Some quick math Comparing just the servers themselves Assume: Test needs to run in 12 hr once a month Requires: 100 - 8 core, x64, 68 GB RAM If you bought servers yourself:  $5000 * 100 = $500,000 Cloud Spot Instances:  100 quad, XL High CPU, 12 hr/mo = $2200  $2200/month * 3 Years = $80K
  23. 23. Scale?
  24. 24. Design for the Cloud Build loosely coupled apps Service enabled Use Messaging & Queues Other Considerations:  Database replication  Database sharding  noSQL for high performance storage
  25. 25. Cat VideoDesign for the Cloud Load Balancers My Site  Serves videos  Injests Web Servers  Encodes Cache  Caches
  26. 26. Cat VideoDesign for the Cloud Load Balancers Loosely Coupled Service Enabled Messaging/Queues Web Servers Cache Scales independently No blocking Ingest Servers Encoding Servers
  27. 27. Database Replication Writes Master-Slave replication Writes on Master Reads on Slaves Master Heavy read, light write Not always consistent (lag) Slave Slave Slave Reads Reads Reads
  28. 28. Database Sharding Horizontal partitioning Name State Zipcode  Country/Continent Marco Ontario M4B 2E1  Postal Codes Cal Tennessee 37201  Date Range Keith Texas 73301 Mark Washington 98034  Consistent hashing
  29. 29. MarcoDatabase Sharding Shard Index:  Shard Id, Partitioned Data, Connection String  Consistent w/lazy writes or batch Lots of support:  Redis Shard Index  MongoDB  Win Azure DB Shards
  30. 30. noSQL Non-relational data store Super fast Good partitioning support Types:  Wide column  Hadoop, Casandra  Document store  mongoDB, CouchDB, ravenDB  Key/value  membase, redis, DynamoDB
  31. 31. IaaS – Infrastructure as a ServicePaaS – Platform as a ServiceSaaS – Software as a Service IaaS = Bring your own OS PaaS = Bring your own App SaaS = Bring your own Customers
  32. 32. SaaS You use this today Your mom might use it too Also very popular for mom
  33. 33. IaaS Virtualized OS Images Storage, Load Balancing, Databases, CDN, identity, caching, messagi ng + other value-add services
  34. 34. Iaas Strengths/Weaknesses Strengths:  Familiar technologies  Supports many scenarios  Limited code lock-in  Can control and configure environment Weaknesses:  Must control and configure environment  Requires administrative skills to use
  35. 35. Amazon Web Services Select an OS from massive library of images  Many flavors of Linux, Windows SQS: Queue hosted as a service on AWS  Unlimited queues & messages  64k message size, 14 day TTL Elastic Load Balancing:  Distributes traffic across your EC2 instances  Detects/removes unhealthy instances & reroutes  Works in a single AZ or across Availability Zones
  36. 36. Amazon Web Services Auto Scaling:  Monitor instance health  Provision/de-provision EC2 instances  Use with ELB to monitor latency to ensure adequate compute to handle demand Content Delivery Network:  Edge cache site and resources  Supports dynamic (per user) content  Pay for only what you use  Push everything, pay for what’s accessed.
  37. 37. Amazon Web Services RDS: MySQL, Oracle, MSSQL DynamoDB: noSQL, SSD, auto-scale, auto-replicated ElastiCache: Memcached compliant S3: Raw data storage, unlimited objects 1k-5TB Elastic BeanStalk (PaaS): VM-based  Java: Tomcat, AWS Toolkit for Eclipse, WAR, CLI  PHP: Apache, git  .NET: IIS, AWS Toolkit for VS or WebDeploy 2.0
  38. 38. RackSpace Far fewer services than AWS Number of services building on OpenStack (in beta) Load Balancing:  Supports: RR, WRR, LC, WLC, random  Supports SSL Termination  Detects/removes unhealthy instances & reroutes  Connection throttling  Available in UK for geo-scale Database: MySQL (beta)
  39. 39. RackSpace Files:  Built on OpenStack (beta).  RackSpace hosted and Akamai option as well Monitoring: (also beta) Web Sites:  PHP: Apache, MySQL, Linux  .NET: IIS, MSSQL, Windows
  40. 40. PaaS Virtualized OS or multi-tenant instance Load Balancing, DB, CDN, Storage (sometimes) Varies widely from vendor to vendor
  41. 41. The Benefits of PaaS Less Complex  There’s less work for developers to do  Go from idea to availability more quickly Less Expensive  Less admin work to do  Hire fewer ops support Less Risky  PaaS platforms do more  Have to design for the PaaS  Fewer opportunities for designing apps incorrectly
  42. 42. The Drawbacks of PaaS Learning curve  You have to learn their PaaS platform Less control  Platform does more, you do less, thus less control Vendor lock-in  Doesn’t match your on-premise test servers Migration  Moving existing apps is difficult
  43. 43. Heroku Built on AWS (XL High Mem Instances) Nginx reverse proxy (SSL Term) extra $ for SSL Varnish cache Languages: Ruby, Node.js, Clojure, Java, Python, PHP* Dynamically spins up and shut down apps (dynos) Dyno gets 512MB memory Deploy: git->(app, gem’s)->slug->compiled->deploy Database: PostgreSQL Addons: Memcached, SSL Read only FS
  44. 44. Engine Yard Also built on AWS Languages: Ruby, node.js, PHP (Orchestra) Free: shared multi-tenant. Paid: VM’s Nginx: reverse proxy, cache & web server (no htaccess) Deploy: git & SVN Read only FS, use S3 Addons: couchDB, memcached, MongoDB, solr, ZeroMQ… Frameworks: Zend, Lithium, Symfony/2, FRAPI, Solar
  45. 45. PHPCloud Dev environment in the cloud (different than others) Apps hosted in Zend App Fabric Choice of clouds to deploy production app to  AWS, RackSpace, IBM, HP Snapshot – cool for sharing environments Lots of features from Zend Server available:  Monitoring  Autoscaling  CodeTracing  Queues
  46. 46. PHPFog Built on AWS Cloud Foundry: PHP, .NET, Ruby, Java, Node.js… Varnish cache, Nginx LB, Apache web server SSH support S3 for storage Handy Jumpstarts  Apps: Drupal, WordPress, Sugar, Facebook…  Fx: Cake, Zend, CodeIgniter, Kohana, Silex, FuelPHP… Addons: MongoDB, IronMQ, NewRelic…
  47. 47. Windows Azure Compute:  Web Role, Worker Role  Non-persistent VM Database: SQL Azure  Access from cloud or on-premise  OLAP  Sharding via Federation  Data Sync (uni/bi-directional)
  48. 48. Windows Azure Storage:  Blob: Unstructured/binary (video, images, etc.)  Table: key/value (noSQL)  Drives: blob mounted as single volume NTFS VHD 3x auto-replication within DC Blobs & Tables geo-replicated automatically Simple CDN integration
  49. 49. Windows Azure Service Bus:  Queues  Topics/Subscriptions: pub/sub Caching, CDN Traffic Manager: (Load Balancer)  Same or different DC’s, geo-scale  Auto-failover SDK’s:  .NET, Java, Node.js, PHP
  50. 50. The Event Join us at Madrone Studios in San Francisco on June 7th. Youll connect with senior technologists from Microsoft and the Bay area who will introduce you to Windows Azure. Come see the unveiling of the latest in Microsofts cloud-based technology and be part of a dynamic live experience.