55
Moving Cloud Beyond Hype to Reality Mark Brown Community Manager Windows Azure Microsoft Corporation @markjbrown

Moving Cloud from Hype To Reality

Embed Size (px)

DESCRIPTION

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

Citation preview

  • 1.Mark Brown Community Manager Windows AzureMicrosoft Corporation @markjbrown

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. 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. Cloud Characteristics Provides high reliability Runs on commodity hardware Should allow for elasticity Should provide economies of scaleResourcesCost 5. From Hosting to Cloud ComputingCapabilityHostingCloudCapacityReservedOn DemandPayment Per MonthPer Hour Provisioning Managed Self-Service 6. Weve had hosting forever.What has changed? 7. Bandwidth 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 $02003 2006 2002200520092001 2004 2010 1998 20002011 20082007 20121999 9. Theres more bandwidth tooAverage bitrates for streaming media40003500 90x300025002000 Avg BitRates15001000 5000 199820032007 2011 10. Hardware 11. Storage Prices252015$/GB10 50 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 12. Memory Prices Cost for RAM $/MB1.210.80.6 $/MB0.40.2 02000 2001 2002 2003 2004 20052006200720082009 2010 2011 2012 13. Virtualization 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. REST 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. Before the Cloud. Could I Create an iPhone app that could support exponentialuser growth? Do big data or scientific computing without investingin 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. Insane user growthInstagram Users450000004000000035000000300000002500000020000000Users 150000001000000050000000Oct Dec Feb Apr Jun Sept Nov Jan Mar May2010 2010 2011 2011 2011 2011 2011 2012 2012 2012 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. Test Lab Utilization12010080604020 0Jan Feb Mar Apr May June July Aug Sep Oct Nov Dec Jan 21. How Many Servers do I buy? Utilization120 This Many!!!10080604020 0Jan Feb Mar Apr May June July Aug Sep Oct Nov Dec Jan 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. Scale? 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. Cat VideoDesign for the CloudLoad Balancers My Site Serves videos InjestsWeb Servers EncodesCache Caches 26. Cat VideoDesign for the CloudLoad Balancers Loosely Coupled Service Enabled Messaging/Queues Web Servers Cache Scales independently No blocking Ingest ServersEncoding Servers 27. Database ReplicationWrites Master-Slave replication Writes on Master Reads on SlavesMaster Heavy read, light write Not always consistent (lag)Slave Slave SlaveReads Reads Reads 28. Database Sharding Horizontal partitioningNameStateZipcode Country/Continent Marco OntarioM4B 2E1 Postal CodesCal Tennessee37201 Date RangeKeith Texas73301MarkWashington 98034 Consistent hashing 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 DBShards 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. IaaS Infrastructure as a ServicePaaS Platform as a ServiceSaaS Software as a Service IaaS = Bring your own OSPaaS = Bring your own App SaaS = Bring your own Customers 32. SaaS You use this today Your mom might use it too Also very popular for mom 33. IaaS Virtualized OS Images Storage, LoadBalancing, Databases, CDN, identity, caching, messaging + other value-add services 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. 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. 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 whats accessed. 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. 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. 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. PaaS Virtualized OS or multi-tenant instance Load Balancing, DB, CDN, Storage (sometimes) Varies widely from vendor to vendor 41. The Benefits of PaaS Less Complex Theres 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. 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 Doesnt match your on-premise test servers Migration Moving existing apps is difficult 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, gems)->slug->compiled->deploy Database: PostgreSQL Addons: Memcached, SSL Read only FS 44. Engine Yard Also built on AWS Languages: Ruby, node.js, PHP (Orchestra) Free: shared multi-tenant. Paid: VMs 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. 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. 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. 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. 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. Windows Azure Service Bus: Queues Topics/Subscriptions: pub/sub Caching, CDN Traffic Manager: (Load Balancer) Same or different DCs, geo-scale Auto-failover SDKs: .NET, Java, Node.js, PHP 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.http://meetwindowsazure.com