Build your own Cloud PaaS the Netflix Way!

4,696 views
4,374 views

Published on

Amazon Web Services revolutionized the software hosting industry by inventing IaaS, Infrastructure-as-a-Service. IaaS offers fundamental pieces of hosted software infrastructure such as a block store, an object store, compute nodes, public-facing load balancers, and messaging. As revolutionary as this was, it was still fairly difficult for a developer or a small startup to build services on top of these fundamental building blocks. For example, AWS was designed for 2-tier web architectures, where a public-facing front-end server would talk directly to one of the AWS's database offerings. Modern web architectures employ multiple layers of servers (middle-tier) between the front-end and database servers, requiring services such as dynamic discovery. Modern web architectures often require other specialized services in the form of configuration, encryption, search, caching, log aggregation, monitoring & alerting, etc... In order to ease this initial burden on developers, several PAAS providers emerged in the early days, such as Heroku, DotCloud, etc... In a few cases, AWS has bridged the gap (e.g. search-as-a-service, EMR, etc...). Netflix is now offering another approach. It has open-sourced its PaaS components in order to allow any developer/startup to build his/their own PaaS.

This talk was originally presented by Sudhir Tonse on the Cloud Track at QCon San Francisco 2013.

Published in: Technology, Education

Build your own Cloud PaaS the Netflix Way!

  1. 1. Build Your Own PaaS the Netflix Way! Sudhir Tonse Manager, Cloud Platform Infrastructure @stonse
  2. 2. I am PaaS (and so can You!) Your Cloud PaaS
  3. 3. Agenda • PaaS? What is it good for? • NetflixOSS -> Build your own PaaS the Netflix Way! • What you need to build, deploy and operate a Cloud Native set of applications • Cloud Native Architecture • Platform Services -> Application Services on top of IaaS • Platform Libraries -> Application Framework Libraries • Platform Tools/Operational Utilities -> Helps deploy and manage your Cloud Apps
  4. 4. PaaS? What is it? Libraries, Tools and Frameworks that enable one to Build, Deploy and Manage Software Services on Ephemeral, On Demand Virtual Machines (IaaS) @stonse #QConSF
  5. 5. Netflix Cloud Stack (IaaS, PaaS, SaaS, Cloud Management) Virtualization Technologies
  6. 6. Netflix Cloud Stack Clients Browsers, Mobile, Televisions … Applications/Web Services PaaS Execution Env (JVM), Web/App Servers, Frameworks, Tools IaaS Virtual Machines, Networking, Load Balancers … Netflix Apps/Services
  7. 7. You can too! Virtualization Technologies
  8. 8. Build Your Own PaaS
  9. 9. Build Your Own PaaS • Yes you can! • Others have done it • Yes, on non-AWS environments too!!
  10. 10. Cloud Native Architecture
  11. 11. The Netflix Way!? Bus + Freedom Dev + Ops Responsibility Culture BusDevOps
  12. 12. Think … Cloud Native Architecture - Adrian Cockroft (@adrianco)
  13. 13. Fine-Grained Reliable, Available, Distributed Service Oriented Architecture - that supports Rapid Iteration/innovation
  14. 14. Architectural Insights Slide courtesy @adrianco
  15. 15. LIFECYCLE • Think, Implement, Deploy, Test, Operate
  16. 16. Platform Services + Application Framework Libraries + Operational Tools
  17. 17. Your Cloud PaaS!! OR Other IaaS
  18. 18. Platform Runtime Services Metadata Registry Eureka Monitoring Services Turbine Distributed Coordinator/Registry (Zookeeper) Exhibitor Metrics Services Servo + AWS CloudWatch Distributed Cache EVCache AWS Resources Lifecycle Service Edda SQS
  19. 19. Platform Libraries - Application Container/Framework Function NetflixOSS Library REST Framework/Bootstrapping/DI Karyon/Governator Functional Reactive Programming RxJava Resiliency/Fallback Hystrix RPC (Routing/LB) Ribbon/Eureka Distributed Co-ordination (Zookeeper) Service Requests Curator Distributed Caching EVCache NoSQL (Cassandra) Persistence Data Access/Caching Astyanax Monitoring Turbine Metrics Servo Logging Blitz4J Properties/Configuration Archaius Config/Insights
  20. 20. Platform Big Data/Caching & Services Cassandra NoSQL Astyanax Priam CassJMeter Hadoop Platform As a Service Genie Lipstick
  21. 21. Platform Tools & Services Deployment/Workflow Asgard Frigga Glisten Aminator Availability, Resiliency, Costing, Monitoring (Ops Tools) SimianArmy ICE
  22. 22. Soon ….
  23. 23. How do I get Started?
  24. 24. How do I create an App/Service?
  25. 25. Sample Application – RSS Reader http://techblog.netflix.com/2013/03/introducing-first-netflixoss-recipe-rss.html
  26. 26. STEP 1 Choice A: Bare bones Web Service Template $git clone https://github.com/Netflix/karyon.git $cd karyon $./gradlew clean build $./gradlew :karyon-examples:hello-netflixoss:jettyRun Choice B: Full blown Recipe (RSS Reader Recipe) $git clone https://github.com/Netflix/recipes-rss.git $cd recipes-rss $./gradlew clean build
  27. 27. STEP 2 • Customize your App using .war of previous step as a template • TIPS (optional) • Use Ribbon for RPC calls • Use Hystrix/RxJava for wrapping concurrent calls/RPC calls (Latency/Fault Tolerance)
  28. 28. STEP 3 • Bake an AMI (Amazon Machine Image) using NetflixOSS Aminator
  29. 29. STEP 4 • Deploy to EC2 using Asgard Deploy & Manage AWS Applications/Infrastructure • TIP: Employ Simian Army to test Resiliency
  30. 30. Building Apps and AMIs
  31. 31. Building Apps and AMIs App Karyon Build WAR Deploy Aminator Asgard ASG /Cluster Launch Instances App AMI ASG/Cluster
  32. 32. Your Cloud! Metadata Registry Eureka App AMI Billing ASG Ribbon (RPC) App AMI Credit P ASG App AMI Order P ASG
  33. 33. Libraries and Services in (some) Detail ...
  34. 34. Eureka: Metadata Registry as a Service
  35. 35. Ribbon: RPC Library (with Software Load Balancers)
  36. 36. Archaius: Configuration (properties) as a Service • Property Driven Development for (int i=0; I < numRowsProperty.get(); i++){ fetchMovieForRow(i, numMoviePerRowProperty.get()); }
  37. 37. Archaius: Configuration (properties) as a Service
  38. 38. Curator + Exhibitor: Distributed Sync & Coordination Services (Zookeeper) http://curator.incubator.apache.org/
  39. 39. Hystrix: Defend your App
  40. 40. Libraries/Services/Framework for Operations
  41. 41. Deploy ..
  42. 42. Asgard: Deployment
  43. 43. Glisten: Orchestration/Workflow
  44. 44. Observe/Monitor … Insights
  45. 45. Servo (+ AWS CloudWatch): Metrics as a Service JMX CloudWatch
  46. 46. Turbine: Hystrix Dashboard (Real Time Metrics Aggregator) • Low Latency, High Throughput Stream Processing Engine • Real Time Metrics Dashboard
  47. 47. Edda: Lifecycle (AWS resource) Blogger as a Service
  48. 48. ICE : AWS Resource Usage (Cost)
  49. 49. Are you Resilient?
  50. 50. Simian Army: Availability/Resiliency as a Service • Chaos Monkey • Kills instances • Janitor Monkey • Clean up unused Resources • Conformity Monkey • Confirms adherence to Best Practices • Others (yet to be open sourced) • Latency Monkey • Chaos Kong • …
  51. 51. Monkeys Contd …
  52. 52. Advanced Topics … Predictive Auto Scaling Engine http://techblog.netflix.com
  53. 53. Genie: Hadoop Platform as a Service Jeff Magnusson: Tomorrow at QConSF
  54. 54. Other Open Source Components (you can use) + Many Many More ….
  55. 55. Further Reading … • http://techblog.netflix.com • http://slideshare.net/netflix • http://netflix.github.io • http://fluxcapacitor.com
  56. 56. Takeaways … • Cloud Computing and Cloud based Services requires embracing Cloud Native - Adrian Cockroft (@adrianco) • NetflixOSS is here to help! • You can build your own custom PaaS the Netflix Way! http://netflix.github.io Yes, we are Hiring!

×