#RUBYFUZA
CONFERENCE
  FEB 2011
Who am I?

• Cofounder/CTO of RSAWEB & other companies in
  RAMPGroup
• Chief Architect / Product owner of RSAWEBCloud.com
• Twitter: @markslingsby
• mark@rsaweb.co.za
Content

• Intro to Cloud/Iaas/Paas
• Infrastructure Evolution
• RSAWEBCloud.com (a Ruby project)
• Scaling
•
The Goal

           IT as a Service
      Just like the Telephone or Electricity




                       •   Inexpensive, pay as you go
                       •   Usage and consumption based
                       •   Always up and Available
                       •   Reliable
                       •   Choice of providers
The Evolution of Applications



                                Cloud
                        Web

             PC/Client-Server

      Mainframe




 4
Different types of Cloud Computing
                     3 Main Types:
                       SaaS = Application/Information – Sometimes referred
                         to as Software-as-a-Service, a wide ranging services
                         delivered via varied business models normally
                         available as public offering.


                       PaaS = Development – Sometimes referred
                         to as Platform-as-a-Service, application development
                         platforms enable application authoring and runtime
                         environment.


                       IaaS = Infrastructure – Sometimes referred
                          to as elastic compute clouds or Infrastructure-as-a-
                          Service, virtual hardware made available for varied
                          uses.




 2 Main Deployment    External – Accessible              Internal – Behind
                      over the internet for              corporate firewall for use
      Environments    general consumption                by limited, pre-
                                                         determined audience
Turning commonality
    into a utility
as a Service examples

  Application/
  Information
  (SaaS)




  Development
  (PaaS)




 Infrastructure
 (IaaS)
What is IaaS?

• Utility computing service and billing model.
• Automation of administrative tasks.
• Dynamic scaling.
• Desktop virtualization.
• Policy-based services.
• Internet connectivity.
Evolution of Iaas?
   Client owned hardware

The Dark Ages:       Client managed maintenance
                     Weeks to set up
     Colocation      Weeks to order and configure
                     Redundancy expensive to setup
   Leased hardware

   The Present:
                       Managed maintenance
                       Days to set up
Dedicated Servers      Days to order and configure
                       Redundancy expensive to setup
   Pooled hardware resources

 The Future:    
                
                    Hardware on demand
                    Instant set up
Cloud Servers      Minutes to order and configure
                   Inherent redundancy
RSAWEBCloud.com
                               Dedicate           Virtual                Cloud
Design Goal                    Simple, Low cost   Low cost               Flexiblity, Scalability
         FrontEnd
Dedicated Resources
                               d
                               Baremetal, YES     Virtualised, Maybe     Virtualised, YES
            (Rails)
High Availability              No                 No (possible but $$)   Yes

Fault Tolerant                 No                 No                     Yes *

Disk Storage                   On machine         On machine             SAN / Block Storage

Scalability                    None               Medium                 High

Advantages                     Full access to     Flexibility            Flexibility
                               hardware
Disadvantages                  Not flexible        Customers perception   Provider must be
                                                                         good
Access                         Root               Root                   Root

Provision time                 Days to weeks      Hours                  Seconds

API Access (Create VM, Stop,   None               None                   YES
Start)
Add more disk space            None               Limited                Yes

Shared disk space between      Limited            Limited                Yes
servers
The advantages of using Cloud Hosting or IaaS

• Performance
• Scalability and flexibility
• High availability & Redundancy
• Integrated management Control Panel
• Pay as you use model
Challenges to using aaS

• Governance
• Security
• Privacy
• Control
Why Cloud makes sense
Scalable Capacity
RSAWEBCloud.com

   FrontEnd
    (Rails)
RSAWEBCloud.com

   FrontEnd
    (Rails)
RSAWEBCloud.com
RSAWEBCloud.com

    FrontEnd      MyRSAWEB
     (Rails)      (billing etc)
RSAWEBCloud.com

       FrontEnd       MyRSAWEB
        (Rails)       (billing etc)



   Cloud   Cloud         Node 1
  Manager Manager        Node 2
                         Node 3
                           .....
    Storage Storage
     SAN     SAN        Node X
RSAWEBCloud.com

       FrontEnd       MyRSAWEB
        (Rails)       (billing etc)



   Cloud   Cloud         Node 1
  Manager Manager        Node 2
                         Node 3
                           .....
    Storage Storage
     SAN     SAN        Node X
Why RSAWEBCloud?
Why RSAWEBCloud?

Hows it different to AWS
Why RSAWEBCloud?

Hows it different to AWS
• Persistent storage (no loss of data or state)
Why RSAWEBCloud?

Hows it different to AWS
• Persistent storage (no loss of data or state)
• Public IP remains bound to machine of choice
Why RSAWEBCloud?

Hows it different to AWS
• Persistent storage (no loss of data or state)
• Public IP remains bound to machine of choice
• Can run SQL DB’s with HA (and it works!)
Why RSAWEBCloud?

Hows it different to AWS
• Persistent storage (no loss of data or state)
• Public IP remains bound to machine of choice
• Can run SQL DB’s with HA (and it works!)
• Infinitely easier to migrate existing apps
Challenges for developers
Challenges for developers

• Works great on my machine
Challenges for developers

• Works great on my machine
• Works great in testing
Challenges for developers

• Works great on my machine
• Works great in testing
• Why is it slow & unresponsive live?
Challenges for developers

• Works great on my machine
• Works great in testing
• Why is it slow & unresponsive live?
• Why is the server grinding to a halt?
Challenges for developers
Challenges for developers

• Dev’s get stuck with designing the
  infrastructure layer too
Challenges for developers

• Dev’s get stuck with designing the
  infrastructure layer too
• How do we solve this?
Challenges for developers
Challenges for developers

• Go through optimisations etc..
Challenges for developers

• Go through optimisations etc..
• but then what?
Challenges for developers

• Go through optimisations etc..
• but then what?
• Upgrade the server?
Challenges for developers

• Go through optimisations etc..
• but then what?
• Upgrade the server?
• Limits
Challenges for developers

• Go through optimisations etc..
• but then what?
• Upgrade the server?
• Limits
• Budget approvals
Scaling OUT
Scaling OUT

• Architecture structure is vital
• How do you scale s i d e w a y s?
Scaling OUT

              Shared IP / Carp
Scaling OUT

                 Shared IP / Carp

               Load          Load
              Balancer      Balancer
Scaling OUT

                    Shared IP / Carp

                Load            Load
               Balancer        Balancer


       Web Server     Web Server       Web Server   Web Serve
Scaling OUT

                    Shared IP / Carp

                Load            Load
               Balancer        Balancer


       Web Server     Web Server       Web Server   Web Serve


                                   NosQL DB
                                      NoSQL DB
                                         NoSQL DB
Scaling OUT

                    Shared IP / Carp

                Load            Load
               Balancer        Balancer


       Web Server     Web Server       Web Server   Web Serve


  MySQL DB                         NosQL DB
    MySQL DB                          NoSQL DB
                                         NoSQL DB
Scaling OUT

                     Shared IP / Carp

                Load             Load
               Balancer         Balancer


       Web Server      Web Server       Web Server    Web Serve


  MySQL DB                           NosQL DB
    MySQL DB                            NoSQL DB
                                           NoSQL DB

                    MySQL Slave(s)
Scaling OUT

                      Shared IP / Carp

                 Load             Load
 Memcache       Balancer         Balancer


        Web Server      Web Server       Web Server    Web Serve


  MySQL DB                            NosQL DB
    MySQL DB                             NoSQL DB
                                            NoSQL DB

                     MySQL Slave(s)
Scaling OUT - Critical must do’s
Scaling OUT - Critical must do’s

1. Think asynchronously
Scaling OUT - Critical must do’s

1. Think asynchronously
2. Think vertically
Scaling OUT - Critical must do’s

1. Think asynchronously
2. Think vertically
3. Keep data types separate
Scaling OUT - Critical must do’s

1. Think asynchronously
2. Think vertically
3. Keep data types separate
4. Separate hot & cold data
Scaling OUT - Critical must do’s

1. Think asynchronously
2. Think vertically
3. Keep data types separate
4. Separate hot & cold data
5. Memory ROCKS!
Scaling OUT - how???


                 - Difficulty of migration depends on
     Existing      existing complexity
                 - May need DB refactoring / migration
        Apps     - Sessions can be sorted in Memcache
                 - Loadbalancer & multiple webservers, app
                   needs to handle different IP’s
                 - Add slave SQL Db’s for read performance
                 - Add a monitoring server to start & deploy
                   new servers as needed
                 - Puppet / Chef
Scaling OUT - how???


                 - Files can be stored on centralised storage
         New     - Sessions can be sorted in Memcache
                 - Loadbalancer & multiple webservers
         Apps    - Add slave SQL Db’s for read performance
                 - Add a monitoring server to start & deploy
                   new servers
                 - Use NoSQL where appropriate
                 - Puppet / Chef
Scaling OUT - how???


                 - Monitor load - Nagios
                 - Do something about it
    Managing     - Autoprovision with Chef/Puppet
                 - Continue to monitor load
                 - Deploy & Recover on demand
Scaling OUT - how???




    Managing
Closing

Chat to us about:
• Cloud
• Scaling
• High volume sites/apps
• 1 month off:
• Or signup for 7 day trial
  www.rsawebcloud.com
  Twitter: @markslingsby

Cloud Computing & Scaling Web Apps

  • 1.
  • 2.
    Who am I? •Cofounder/CTO of RSAWEB & other companies in RAMPGroup • Chief Architect / Product owner of RSAWEBCloud.com • Twitter: @markslingsby • mark@rsaweb.co.za
  • 4.
    Content • Intro toCloud/Iaas/Paas • Infrastructure Evolution • RSAWEBCloud.com (a Ruby project) • Scaling •
  • 5.
    The Goal IT as a Service Just like the Telephone or Electricity • Inexpensive, pay as you go • Usage and consumption based • Always up and Available • Reliable • Choice of providers
  • 6.
    The Evolution ofApplications Cloud Web PC/Client-Server Mainframe 4
  • 7.
    Different types ofCloud Computing 3 Main Types: SaaS = Application/Information – Sometimes referred to as Software-as-a-Service, a wide ranging services delivered via varied business models normally available as public offering. PaaS = Development – Sometimes referred to as Platform-as-a-Service, application development platforms enable application authoring and runtime environment. IaaS = Infrastructure – Sometimes referred to as elastic compute clouds or Infrastructure-as-a- Service, virtual hardware made available for varied uses. 2 Main Deployment External – Accessible Internal – Behind over the internet for corporate firewall for use Environments general consumption by limited, pre- determined audience
  • 8.
    Turning commonality into a utility
  • 9.
    as a Serviceexamples Application/ Information (SaaS) Development (PaaS) Infrastructure (IaaS)
  • 10.
    What is IaaS? •Utility computing service and billing model. • Automation of administrative tasks. • Dynamic scaling. • Desktop virtualization. • Policy-based services. • Internet connectivity.
  • 11.
  • 12.
    Client owned hardware The Dark Ages:  Client managed maintenance  Weeks to set up Colocation  Weeks to order and configure  Redundancy expensive to setup
  • 13.
    Leased hardware The Present:  Managed maintenance  Days to set up Dedicated Servers  Days to order and configure  Redundancy expensive to setup
  • 14.
    Pooled hardware resources The Future:   Hardware on demand Instant set up Cloud Servers  Minutes to order and configure  Inherent redundancy
  • 15.
    RSAWEBCloud.com Dedicate Virtual Cloud Design Goal Simple, Low cost Low cost Flexiblity, Scalability FrontEnd Dedicated Resources d Baremetal, YES Virtualised, Maybe Virtualised, YES (Rails) High Availability No No (possible but $$) Yes Fault Tolerant No No Yes * Disk Storage On machine On machine SAN / Block Storage Scalability None Medium High Advantages Full access to Flexibility Flexibility hardware Disadvantages Not flexible Customers perception Provider must be good Access Root Root Root Provision time Days to weeks Hours Seconds API Access (Create VM, Stop, None None YES Start) Add more disk space None Limited Yes Shared disk space between Limited Limited Yes servers
  • 16.
    The advantages ofusing Cloud Hosting or IaaS • Performance • Scalability and flexibility • High availability & Redundancy • Integrated management Control Panel • Pay as you use model
  • 17.
    Challenges to usingaaS • Governance • Security • Privacy • Control
  • 18.
  • 19.
  • 20.
    RSAWEBCloud.com FrontEnd (Rails)
  • 21.
    RSAWEBCloud.com FrontEnd (Rails)
  • 22.
  • 23.
    RSAWEBCloud.com FrontEnd MyRSAWEB (Rails) (billing etc)
  • 24.
    RSAWEBCloud.com FrontEnd MyRSAWEB (Rails) (billing etc) Cloud Cloud Node 1 Manager Manager Node 2 Node 3 ..... Storage Storage SAN SAN Node X
  • 25.
    RSAWEBCloud.com FrontEnd MyRSAWEB (Rails) (billing etc) Cloud Cloud Node 1 Manager Manager Node 2 Node 3 ..... Storage Storage SAN SAN Node X
  • 26.
  • 27.
    Why RSAWEBCloud? Hows itdifferent to AWS
  • 28.
    Why RSAWEBCloud? Hows itdifferent to AWS • Persistent storage (no loss of data or state)
  • 29.
    Why RSAWEBCloud? Hows itdifferent to AWS • Persistent storage (no loss of data or state) • Public IP remains bound to machine of choice
  • 30.
    Why RSAWEBCloud? Hows itdifferent to AWS • Persistent storage (no loss of data or state) • Public IP remains bound to machine of choice • Can run SQL DB’s with HA (and it works!)
  • 31.
    Why RSAWEBCloud? Hows itdifferent to AWS • Persistent storage (no loss of data or state) • Public IP remains bound to machine of choice • Can run SQL DB’s with HA (and it works!) • Infinitely easier to migrate existing apps
  • 32.
  • 33.
    Challenges for developers •Works great on my machine
  • 34.
    Challenges for developers •Works great on my machine • Works great in testing
  • 35.
    Challenges for developers •Works great on my machine • Works great in testing • Why is it slow & unresponsive live?
  • 36.
    Challenges for developers •Works great on my machine • Works great in testing • Why is it slow & unresponsive live? • Why is the server grinding to a halt?
  • 37.
  • 38.
    Challenges for developers •Dev’s get stuck with designing the infrastructure layer too
  • 39.
    Challenges for developers •Dev’s get stuck with designing the infrastructure layer too • How do we solve this?
  • 40.
  • 41.
    Challenges for developers •Go through optimisations etc..
  • 42.
    Challenges for developers •Go through optimisations etc.. • but then what?
  • 43.
    Challenges for developers •Go through optimisations etc.. • but then what? • Upgrade the server?
  • 44.
    Challenges for developers •Go through optimisations etc.. • but then what? • Upgrade the server? • Limits
  • 45.
    Challenges for developers •Go through optimisations etc.. • but then what? • Upgrade the server? • Limits • Budget approvals
  • 46.
  • 47.
    Scaling OUT • Architecturestructure is vital • How do you scale s i d e w a y s?
  • 48.
    Scaling OUT Shared IP / Carp
  • 49.
    Scaling OUT Shared IP / Carp Load Load Balancer Balancer
  • 50.
    Scaling OUT Shared IP / Carp Load Load Balancer Balancer Web Server Web Server Web Server Web Serve
  • 51.
    Scaling OUT Shared IP / Carp Load Load Balancer Balancer Web Server Web Server Web Server Web Serve NosQL DB NoSQL DB NoSQL DB
  • 52.
    Scaling OUT Shared IP / Carp Load Load Balancer Balancer Web Server Web Server Web Server Web Serve MySQL DB NosQL DB MySQL DB NoSQL DB NoSQL DB
  • 53.
    Scaling OUT Shared IP / Carp Load Load Balancer Balancer Web Server Web Server Web Server Web Serve MySQL DB NosQL DB MySQL DB NoSQL DB NoSQL DB MySQL Slave(s)
  • 54.
    Scaling OUT Shared IP / Carp Load Load Memcache Balancer Balancer Web Server Web Server Web Server Web Serve MySQL DB NosQL DB MySQL DB NoSQL DB NoSQL DB MySQL Slave(s)
  • 55.
    Scaling OUT -Critical must do’s
  • 56.
    Scaling OUT -Critical must do’s 1. Think asynchronously
  • 57.
    Scaling OUT -Critical must do’s 1. Think asynchronously 2. Think vertically
  • 58.
    Scaling OUT -Critical must do’s 1. Think asynchronously 2. Think vertically 3. Keep data types separate
  • 59.
    Scaling OUT -Critical must do’s 1. Think asynchronously 2. Think vertically 3. Keep data types separate 4. Separate hot & cold data
  • 60.
    Scaling OUT -Critical must do’s 1. Think asynchronously 2. Think vertically 3. Keep data types separate 4. Separate hot & cold data 5. Memory ROCKS!
  • 61.
    Scaling OUT -how??? - Difficulty of migration depends on Existing existing complexity - May need DB refactoring / migration Apps - Sessions can be sorted in Memcache - Loadbalancer & multiple webservers, app needs to handle different IP’s - Add slave SQL Db’s for read performance - Add a monitoring server to start & deploy new servers as needed - Puppet / Chef
  • 62.
    Scaling OUT -how??? - Files can be stored on centralised storage New - Sessions can be sorted in Memcache - Loadbalancer & multiple webservers Apps - Add slave SQL Db’s for read performance - Add a monitoring server to start & deploy new servers - Use NoSQL where appropriate - Puppet / Chef
  • 63.
    Scaling OUT -how??? - Monitor load - Nagios - Do something about it Managing - Autoprovision with Chef/Puppet - Continue to monitor load - Deploy & Recover on demand
  • 64.
    Scaling OUT -how??? Managing
  • 65.
    Closing Chat to usabout: • Cloud • Scaling • High volume sites/apps • 1 month off: • Or signup for 7 day trial www.rsawebcloud.com Twitter: @markslingsby

Editor's Notes

  • #2 \n
  • #3 \n
  • #4 KEY SOUNDBITE: “Just like the landline phone or the power socket on \nthe wall, Cloud Computing is using the same model for IT—inexpensive, pay as \nyou go, operates on a base infrastructure and just works.”\n
  • #5 \n
  • #6 KEY SOUNDBITE: “Just like the landline phone or the power socket on \nthe wall, Cloud Computing is using the same model for IT—inexpensive, pay as \nyou go, operates on a base infrastructure and just works.”\n
  • #7 Historically, industry shifts are driven by new needs and new economics\nWe are in this shift right now …a new era in IT that finally addresses complexity rather than adding it. \n
  • #8 Key Talking Points: We see 3 different basic types of cloud computing today. \n\nApplication or Information are the best known, highly visible as consumer web sites and in general are focused on the delivery of information.\n\nPros: Usually very inexpensive to use. In case of commercial centered solutions many are driven by ad revenues.\n\nCons: Not customizable. Limited ability to integrate with internal systems and limited application coverage for business purposes.\n\nKey Talking Points: Second type of cloud computing is least well known and is focused on delivering software development environments and runtimes as a service. A consumer of such a service would write an application using the using the service and then make use of the supplied runtime environment for that application. \n\nPros: Facilitates rapid development\n\nCons:Not compatible with existing applications thus creating need to rewrite applications before they can make use of such service\n\nFinally, the 3rd type of cloud computing is focused on providing the most generalizable solution and that is basic infrastructure as a service. These solutions provide to the consumer storage, networking and computing capacity as a service, sometimes in very high granularities of billing such as hourly.\n\nA vast majority of these solutions are based on virtualization.\n
  • #9 \n
  • #10 \n
  • #11 \n
  • #12 \n
  • #13 \n
  • #14 \n
  • #15 \n
  • #16 \n
  • #17 \n
  • #18 But the decision for enterprises on how far to leverage computing platforms in the cloud will be much more complicated. The economics will increasingly make more sense to run business applications on these new platforms now that major competition has emerged in the PaaS marketplace that will put major downward pressure on already strikingly low costs to operate. But the issues around governance, security, privacy, and control will be hard to overcome. Make no mistake however, these platforms offer not only major cost savings but non-trivial productivity boosts as they competitively strive to be the cheapest and lowest barrier place online to run your business applications and engage your employees, customers, and partners.\n
  • #19 \n
  • #20 \n
  • #21 \n
  • #22 \n
  • #23 \n
  • #24 \n
  • #25 \n
  • #26 \n
  • #27 \n
  • #28 \n
  • #29 \n
  • #30 \n
  • #31 \n
  • #32 \n
  • #33 \n
  • #34 \n
  • #35 \n
  • #36 \n
  • #37 \n
  • #38 \n
  • #39 \n
  • #40 \n
  • #41 \n
  • #42 \n
  • #43 \n
  • #44 \n
  • #45 \n
  • #46 \n
  • #47 \n
  • #48 \n
  • #49 \n
  • #50 \n
  • #51 \n
  • #52 \n
  • #53 \n
  • #54 \n
  • #55 \n
  • #56 \n
  • #57 \n
  • #58 \n