Building Resilient, Web Scale Applications in the Cloud
                      IaaS, PaaS
               - Sudhir Tonse @stonse
       - Manager, Cloud Platform. Netflix LLC
Topics
•   About Netflix and move to Cloud
•   IaaS, PaaS …
•   Architectural/Operational Insights
•   How can you benefit?
    – Various Open Source Offerings (& #cloudprize
      $$$)
    – Netflix PaaS Tech Blogs
    – Build your own PaaS
Netflix
Netflix is the world’s leading Internet television
network with more than 33 million members
in 40 countries enjoying more than one billion
hours of TV shows and movies per month,
including original series.
Netflix Scale
• 100s of Mid-tier services and applications
• Billions of Requests per day
• ~70 Billion Events per day
• 10,000s of Ec2 Instances in use in multiple AWS
  Regions/Zones
• Cassandra NoSQL database in a Global Ring
  spanning regions: Terabytes of data
• At peak consumes ~1/3 of US Internet Bandwidth
What’s a Cloud?
• Cloud:
Cloud computing is the delivery of computing
and storage capacity [1] as a service [2] to a
heterogeneous community of end-recipients.




                                                 Images Courtesy: Wikipedia/Company logos
Cloud Stack (IaaS, PaaS, SaaS, Cloud Management)
       [Representative Sample; not comprehensive]




               Virtualization Technologies
Netflix Cloud Stack (IaaS, PaaS, SaaS, Cloud Management)




             Virtualization Technologies
Netflix Cloud Stack
                   Clients
        Browsers, Mobile, Televisions …




           Applications/Web Services                         Netflix
                                                          Apps/Services


                        PaaS                                  Netflix
Execution Env (JVM), Web/App Servers, Frameworks, Tools   Cloud Platform

                         IaaS
    Virtual Machines, Networking, Load Balancers …
Netflix DataCenter to AWS
• Old DataCenter      • Netflix Cloud
  (2008)                (2010)
• Everything in one   • 100s of Fine
  WebApp (.war)         Grained Services
@adrianco
Typical Deployment
• Multiple Availability Zone
• Multiple Regions




                                @adrianco
Commandments of a Resilient Web Scale Cloud Architecture
   1.     Thou shalt embrace stateless fine grained Micro Services (SOA)
   2.     Thou shalt not store important data on ephemeral instances
   3.     Thou shalt embrace a resilient homogenous architecture
   4.     Thou shalt embrace and understand the CAP Theorem
   5.     Thou shalt guard all external/RPC calls with a fault & latency
          tolerance layer
   6.     Thou shalt embrace auto scaling; scale according to thy needs
   7.     Thou shalt keep a wary eye on thy cost
   8.     Thou shalt secure thy data and access points
   9.     Thou shalt instrument thy code
   10.    Thou shalt effectively monitor thy instances
   11.    Thou shalt deploy thy instances in multiple zones and regions for
          availability and resiliency
   12.    Thou shalt be way of SPoF
   13.    Thou shalt always plan for failure

Note: These are my personal views and may or may not reflect the views of my employers, past or present.
It is not the intention of the author to offend anyone’s religious beliefs or thoughts : - @stonse
Netflix Open Source
Build your own PaaS
Mix and match NetflixOSS Tools & Libraries




                     @adrianco




                                             @rusmeshenberg
Platform Services
AWS Account
Asgard Console


Archaius Config
                  Multiple AWS Regions
    Service


 Cross region
  Priam C*        Eureka Registry


  Explorers
 Dashboards
                   Exhibitor ZK
                                    3 AWS Zones
                                      Application
                                                             Priam              Evcache
     Atlas         Edda History         Clusters
                                                           Cassandra           Memcached
  Monitoring                        Autoscale Groups
                                                       Persistent Storage   Ephemeral Storage
                                       Instances
                   Simian Army
Genie Hadoop
  Services




                                                                                                @adrianco
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-netflix-
oss:jettyRun


Choice B: Full blown Recipe (RSS Reader
Recipe)
$git clone
https://github.com/Netflix/recipes-rss.git
$cd recipes-rss
$./gradlew clean build
Step 2
• Customize your App using .war of previous
  step as a template
  – TIPS (optional)
     • Use Ribbon for IPC calls

     • Use Hystrix/RxJava for wrapping concurrent calls/IPC
       calls (Latency/Fault Tolerance)
Step 3
• Bake an AMI (Amazon Machine Image) using
  NetflixOSS Aminator
Step 4
• Deploy to EC2 using Asgard
            Deploy & Manage AWS
            Applications/Infrastructure




• TIP: Employ Simian Army to test Resiliency
How do you enter?                                  $$
•    Get a (free) github account
•    Fork github.com/netflix/cloud-prize
•    Send us your email address
•    Describe and build your entry
         Twitter #cloudprize

    https://github.com/Netflix/Cloud-
    Prize/blob/master/README.rdoc          @adrianco
Thank You!
• Reach out to me at @stonse
  – Yes, we are hiring!

  Follow @NetflixOSS for more info
                                     Credits/Attributions
                                     • @adrianco
                                     • @rusmeshenberg
                                     • https://en.wikipedia.org/wiki/
                                        File:Hyperviseur.png
                                     • http://techblog.netflix.com
                                     • http://www.slideshare.net/ne
                                        tflix
                                     • http://netflix.github.io

Web Scale Applications using NeflixOSS Cloud Platform

  • 1.
    Building Resilient, WebScale Applications in the Cloud IaaS, PaaS - Sudhir Tonse @stonse - Manager, Cloud Platform. Netflix LLC
  • 2.
    Topics • About Netflix and move to Cloud • IaaS, PaaS … • Architectural/Operational Insights • How can you benefit? – Various Open Source Offerings (& #cloudprize $$$) – Netflix PaaS Tech Blogs – Build your own PaaS
  • 3.
    Netflix Netflix is theworld’s leading Internet television network with more than 33 million members in 40 countries enjoying more than one billion hours of TV shows and movies per month, including original series.
  • 4.
    Netflix Scale • 100sof Mid-tier services and applications • Billions of Requests per day • ~70 Billion Events per day • 10,000s of Ec2 Instances in use in multiple AWS Regions/Zones • Cassandra NoSQL database in a Global Ring spanning regions: Terabytes of data • At peak consumes ~1/3 of US Internet Bandwidth
  • 5.
    What’s a Cloud? •Cloud: Cloud computing is the delivery of computing and storage capacity [1] as a service [2] to a heterogeneous community of end-recipients. Images Courtesy: Wikipedia/Company logos
  • 6.
    Cloud Stack (IaaS,PaaS, SaaS, Cloud Management) [Representative Sample; not comprehensive] Virtualization Technologies
  • 7.
    Netflix Cloud Stack(IaaS, PaaS, SaaS, Cloud Management) Virtualization Technologies
  • 8.
    Netflix Cloud Stack Clients Browsers, Mobile, Televisions … Applications/Web Services Netflix Apps/Services PaaS Netflix Execution Env (JVM), Web/App Servers, Frameworks, Tools Cloud Platform IaaS Virtual Machines, Networking, Load Balancers …
  • 9.
    Netflix DataCenter toAWS • Old DataCenter • Netflix Cloud (2008) (2010) • Everything in one • 100s of Fine WebApp (.war) Grained Services
  • 10.
  • 11.
    Typical Deployment • MultipleAvailability Zone • Multiple Regions @adrianco
  • 13.
    Commandments of aResilient Web Scale Cloud Architecture 1. Thou shalt embrace stateless fine grained Micro Services (SOA) 2. Thou shalt not store important data on ephemeral instances 3. Thou shalt embrace a resilient homogenous architecture 4. Thou shalt embrace and understand the CAP Theorem 5. Thou shalt guard all external/RPC calls with a fault & latency tolerance layer 6. Thou shalt embrace auto scaling; scale according to thy needs 7. Thou shalt keep a wary eye on thy cost 8. Thou shalt secure thy data and access points 9. Thou shalt instrument thy code 10. Thou shalt effectively monitor thy instances 11. Thou shalt deploy thy instances in multiple zones and regions for availability and resiliency 12. Thou shalt be way of SPoF 13. Thou shalt always plan for failure Note: These are my personal views and may or may not reflect the views of my employers, past or present. It is not the intention of the author to offend anyone’s religious beliefs or thoughts : - @stonse
  • 15.
  • 17.
    Build your ownPaaS Mix and match NetflixOSS Tools & Libraries @adrianco @rusmeshenberg
  • 18.
    Platform Services AWS Account AsgardConsole Archaius Config Multiple AWS Regions Service Cross region Priam C* Eureka Registry Explorers Dashboards Exhibitor ZK 3 AWS Zones Application Priam Evcache Atlas Edda History Clusters Cassandra Memcached Monitoring Autoscale Groups Persistent Storage Ephemeral Storage Instances Simian Army Genie Hadoop Services @adrianco
  • 19.
    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-netflix- oss:jettyRun Choice B: Full blown Recipe (RSS Reader Recipe) $git clone https://github.com/Netflix/recipes-rss.git $cd recipes-rss $./gradlew clean build
  • 20.
    Step 2 • Customizeyour App using .war of previous step as a template – TIPS (optional) • Use Ribbon for IPC calls • Use Hystrix/RxJava for wrapping concurrent calls/IPC calls (Latency/Fault Tolerance)
  • 21.
    Step 3 • Bakean AMI (Amazon Machine Image) using NetflixOSS Aminator
  • 22.
    Step 4 • Deployto EC2 using Asgard Deploy & Manage AWS Applications/Infrastructure • TIP: Employ Simian Army to test Resiliency
  • 23.
    How do youenter? $$ • Get a (free) github account • Fork github.com/netflix/cloud-prize • Send us your email address • Describe and build your entry Twitter #cloudprize https://github.com/Netflix/Cloud- Prize/blob/master/README.rdoc @adrianco
  • 24.
    Thank You! • Reachout to me at @stonse – Yes, we are hiring! Follow @NetflixOSS for more info Credits/Attributions • @adrianco • @rusmeshenberg • https://en.wikipedia.org/wiki/ File:Hyperviseur.png • http://techblog.netflix.com • http://www.slideshare.net/ne tflix • http://netflix.github.io