SlideShare una empresa de Scribd logo
1 de 47
PaaS design Patterns
      Michael Neale
      @michaelneale
    www.cloudbees.com
Agenda
Same old practices
                  Portability
Old and new: servers, networks, environments
       All Environments Are The Same
           Use Cloud APIs in builds
           Continuous Deployment
        SOA - same old architecture
            Service as unit of reuse
      Prefer Statelessness (easy to say)
             Fine grained scaling
             REST/api first design
        Don’t Roll your Own Services
                 Skunkworks
Nothing New?



Patterns are guides, usefulness varies with application

  Patterns here are mostly “good design” principles
                ..and kind of ‘classic’
Cloud Portability


              Follow the right patterns

             Avoid lock in to any cloud !

In fact - easier to go cloud -> on premises than other
                       way around

       Data is “sticky” so be careful with DBs
Classical enterprise tiers
                          All your job

        Web
                      Firewalls
  App   App     App

                         Dev servers
         DB

                       Repos and build
   Other services
PaaS cloud “tiers”
      Routing service         Your job !


                                      Repo
        App service     App
                                     service

                                   CI service
Data services    Services
Someone else’s problem


 All services are someone else’s problem
  Note transition from server -> service

          Similar, but nuanced
Classic enterprise servers


                Large, expensive
                Vertically scalable
              Intrinsic redundancy
                 Capex not Opex
            outages rare**, but long
  Cost of provisioning: high in time and money


                   ** Really?
Common cloud servers


             Numerous, cheap
          Horizontally scalable **
    Outages more common, but short
        PaaS job is to hide all this !
            Not your problem !
Cost of provisioning: low in time and money

   ** Actually a lot of choice nowadays
Deployment Environments


 Classic: Dev, Test, UAT, Staging, Production
    Often anaemic hardware for non prod
           Work to move between
      Hardware/software not consistent
Dev and Prod parity

        Homogenous environments
          Dev and prod “identical”
             differ in name only
  No “server crunch” - so why compromise
      No “surprises” when promoting

           Only pay for what you use:
hi-fidelity environments - start/stop as needed
Dev and Prod parity

Development and production environments
          differ in name only
Data cloning

For “modest” volumes of data
Clone into each environment:
One App Many Deploys

     Parametrise via Environment vars
When build “promoted” - same bits as tested !!

             “common sense” ??

“Config varies substantially across deploys, code
                 does not” **

          ** (http://www.12factor.net/)
One App Many Deploys

You can have multiple concurrent versions
          as many as you need
              Differ in URL
            Slowly transition
Networking

Classic: layered, partitioned, ops controlled firewalls

  Cloud: flatter networks, programmatic firewalls
       Firewalls also happen at server level

           A PaaS manages this for you
Hybrid Networking

 Need: cloud apps, but some “behind firewall data”

Solutions:
 - replicate data
 - VPN
 - firewall rules on private network (fixed IPs) that
expose select services
Use A CDN

        CDN=Content Delivery Network

                  Fight latency
Move static/cacheable content to CDN edge nodes

     Examples: Amazon Cloudfront, Cachefly
Shift to cloud -> shift to remote servers (sometimes)

            Some users latency sensitive
   Use a CDN with geo-aware DNS (all of them)
  Bulk of “data” delivered can be cached in some
                        cases
CDN == a better cache

        Use hash based asset paths
       (framework + build tools help)

             No expiry caching

                    ==

Maximum chance of cache hit and low latency
Massively improve experience of modern apps
Latency Friendly GUIs

Web interfaces: lightweight js + background loading
              (eg backbone.js style)

      Mobile apps: naturally latency friendly

  Classic request/response web apps are latency
                     sensitive.

 Some latency inevitable, pick frameworks wisely
Use Cloud automation APIs

            All types of clouds have apis

           Make use of them from builds:
           Deploy time (easy roll back !)
   Development and testing (multiple environments)

         Cost saving: only run when needed

            STOP APP or HIBERNATE


   Hibernated apps will wake when testers need it
              (all free apps hibernate)
Deploy early and often

    When it is easy to roll back, it is easy to deploy

          Deliver smaller changes, more often

   (data breaking changes, you can take your time !)

Risk in deployment is proportional to the time since last
                      deployment

          Risk = X * (Now - LastDeployment)
Continuous Deployment
          CI == continuous integration
   Continuous deployment takes the next step

        Tests + Automation == Lower risk

     Deploy to “an environment” continuously
            (may not be production !)

Need a “build/test/dev” automation workflow server
                    (eg Jenkins)
Continuous Deployment

Change     Deployment rules


 source    build           runtime




    If only someone had built this !
Build Workflow




  > 400 plugins
Dog Fooding
SOA
             Same Old Architecture?
Got a bad name due to WS-* and Enterprise Vendors

             Is a very useful approach
       In use by all modern web companies
                   Just not WS-* !

  Build apps as composeable, re-useable services
             On paas cloud: http + rest
SOA
               Build multi tiered applications
                     Separate out tiers
             Separate out background vs online
               GUI vs backoffice functionality

                                                 UI apps
Services
                WebApp         iOS API


           Accounts     Payment          Jobs

             All are just apps on a PaaS
SOA
           Services are still just apps !
        They are consumed by other apps

Different apps/services can have different release
                    cadences

  Use CI automation to help keep things in sync

HTTP interfaces for your own use (health, business
            stats) - not just user facing
Prefer Stateless
             Easy to say - hard to do
        Stateless apps delegate state to:
Databases, cookies, cache servers, external services

             Places state can “hide”:
       User sessions, caches, frameworks**


         ** example: grails + spring security
Prefer Stateless
                 Session data:

Use session service (CloudBees service) - cluster
           friendly (and transparent)

           cookies (modulo security)
                   database
Maybe Stateful
                Stateful is actually ok:

             A cache that can be replaced
                eg Lift Web Framework
             not required to be replicated

In this case - use “sticky sessions” - session affinity to
           a server (just a flag on cloudbees)

                    Scale up vs out

                  State is short lived
Prefer Stateless
                  Why stateless?

             Allows fine grained scaling
   Allows scaling out (as well as up +1 dimension)
                   High Availability
               Zero downtime deploys

 Client side UI state (eg mobile, HTML5) makes this
                   easier than ever

Why does a server care what tab a user has selected?
Prefer Stateless
                       Inevitable:
trend towards functional programming (immutability)
            tracking state and side effects
       will make all this easier (scala, clojure !)
Use fine grained scaling
            Smaller state-light apps
              Scale out quickly

                     Autoscale
(track stats, ensure SLA being met automatically)
                 (no work for you !)

          Only pay for what you need
REST-api first design
 Increasingly common to build REST apis first

     Separate apps for Web, Mobile clients

     Server side becomes less GUI centric

      Shift in frameworks - choose wisely

Services, like databases, live on, are reused, and
           composed into new services
Use Add-ons
  Why host your own email service
Why host your own monitoring/analysis

           Rich ecosystem
  (send grid, new relic, for example)
Use Add-ons
Use Add-ons
This is the “re-use” we were “promised” many years
                         ago

               Finally delivered
           Compose services together
Use Add-ons
            Worried about lock in?

Data services are built on open source, you can
 always export your data and host it yourself

 Other services are less “latency sensitive” (eg
 newrelic is popular for on-prem systems too)
Use Natural Sharding
Many apps have a “natural” way to split up data if
                   needed

         either by data (eg accounts) --
          or by functionality (services)

  As a way to scale out, split apps into multiple
                instances (data)

             Databases in to shards

Cheap and easy to clone environments if needed.
Skunkworks
   “It is easier to ask forgiveness than it is to ask
                       permission”
                    -- Grace Hopper

 Cost of trying/building is cheap, so you can “just
                       build it”

Find a part of your application that could be split off
           into a cloud service on a paas

                  “ask forgiveness”
Thank you

Más contenido relacionado

Más de Michael Neale

Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)Michael Neale
 
Devoxx 2014 michael_neale
Devoxx 2014 michael_nealeDevoxx 2014 michael_neale
Devoxx 2014 michael_nealeMichael Neale
 
Cross site calls with javascript - the right way with CORS
Cross site calls with javascript - the right way with CORSCross site calls with javascript - the right way with CORS
Cross site calls with javascript - the right way with CORSMichael Neale
 
Microservices and functional programming
Microservices and functional programmingMicroservices and functional programming
Microservices and functional programmingMichael Neale
 
Osdc 2011 michael_neale
Osdc 2011 michael_nealeOsdc 2011 michael_neale
Osdc 2011 michael_nealeMichael Neale
 
Java one 2011_michaelneale
Java one 2011_michaelnealeJava one 2011_michaelneale
Java one 2011_michaelnealeMichael Neale
 
Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011Michael Neale
 
SJUG March 2010 Restful design
SJUG March 2010 Restful designSJUG March 2010 Restful design
SJUG March 2010 Restful designMichael Neale
 
On Scala Slides - OSDC 2009
On Scala Slides - OSDC 2009On Scala Slides - OSDC 2009
On Scala Slides - OSDC 2009Michael Neale
 
Osdc Complex Event Processing
Osdc Complex Event ProcessingOsdc Complex Event Processing
Osdc Complex Event ProcessingMichael Neale
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09Michael Neale
 
Osdc Michael Neale 2008
Osdc Michael Neale 2008Osdc Michael Neale 2008
Osdc Michael Neale 2008Michael Neale
 

Más de Michael Neale (17)

Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)
 
Devoxx 2014 michael_neale
Devoxx 2014 michael_nealeDevoxx 2014 michael_neale
Devoxx 2014 michael_neale
 
Cd syd
Cd sydCd syd
Cd syd
 
Cross site calls with javascript - the right way with CORS
Cross site calls with javascript - the right way with CORSCross site calls with javascript - the right way with CORS
Cross site calls with javascript - the right way with CORS
 
Microservices and functional programming
Microservices and functional programmingMicroservices and functional programming
Microservices and functional programming
 
Cors michael
Cors michaelCors michael
Cors michael
 
Osdc 2011 michael_neale
Osdc 2011 michael_nealeOsdc 2011 michael_neale
Osdc 2011 michael_neale
 
Scala sydoct2011
Scala sydoct2011Scala sydoct2011
Scala sydoct2011
 
Java one 2011_michaelneale
Java one 2011_michaelnealeJava one 2011_michaelneale
Java one 2011_michaelneale
 
Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011Errors and handling them. YOW nights Sydney 2011
Errors and handling them. YOW nights Sydney 2011
 
Sjug aug 2010_cloud
Sjug aug 2010_cloudSjug aug 2010_cloud
Sjug aug 2010_cloud
 
SJUG March 2010 Restful design
SJUG March 2010 Restful designSJUG March 2010 Restful design
SJUG March 2010 Restful design
 
On Scala Slides - OSDC 2009
On Scala Slides - OSDC 2009On Scala Slides - OSDC 2009
On Scala Slides - OSDC 2009
 
Osdc Complex Event Processing
Osdc Complex Event ProcessingOsdc Complex Event Processing
Osdc Complex Event Processing
 
Scala Sjug 09
Scala Sjug 09Scala Sjug 09
Scala Sjug 09
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09
 
Osdc Michael Neale 2008
Osdc Michael Neale 2008Osdc Michael Neale 2008
Osdc Michael Neale 2008
 

Último

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 

Último (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 

Paas Design Patterns

  • 1. PaaS design Patterns Michael Neale @michaelneale www.cloudbees.com
  • 3. Same old practices Portability Old and new: servers, networks, environments All Environments Are The Same Use Cloud APIs in builds Continuous Deployment SOA - same old architecture Service as unit of reuse Prefer Statelessness (easy to say) Fine grained scaling REST/api first design Don’t Roll your Own Services Skunkworks
  • 4. Nothing New? Patterns are guides, usefulness varies with application Patterns here are mostly “good design” principles ..and kind of ‘classic’
  • 5. Cloud Portability Follow the right patterns Avoid lock in to any cloud ! In fact - easier to go cloud -> on premises than other way around Data is “sticky” so be careful with DBs
  • 6. Classical enterprise tiers All your job Web Firewalls App App App Dev servers DB Repos and build Other services
  • 7. PaaS cloud “tiers” Routing service Your job ! Repo App service App service CI service Data services Services
  • 8. Someone else’s problem All services are someone else’s problem Note transition from server -> service Similar, but nuanced
  • 9. Classic enterprise servers Large, expensive Vertically scalable Intrinsic redundancy Capex not Opex outages rare**, but long Cost of provisioning: high in time and money ** Really?
  • 10. Common cloud servers Numerous, cheap Horizontally scalable ** Outages more common, but short PaaS job is to hide all this ! Not your problem ! Cost of provisioning: low in time and money ** Actually a lot of choice nowadays
  • 11. Deployment Environments Classic: Dev, Test, UAT, Staging, Production Often anaemic hardware for non prod Work to move between Hardware/software not consistent
  • 12. Dev and Prod parity Homogenous environments Dev and prod “identical” differ in name only No “server crunch” - so why compromise No “surprises” when promoting Only pay for what you use: hi-fidelity environments - start/stop as needed
  • 13.
  • 14. Dev and Prod parity Development and production environments differ in name only
  • 15. Data cloning For “modest” volumes of data Clone into each environment:
  • 16. One App Many Deploys Parametrise via Environment vars When build “promoted” - same bits as tested !! “common sense” ?? “Config varies substantially across deploys, code does not” ** ** (http://www.12factor.net/)
  • 17.
  • 18. One App Many Deploys You can have multiple concurrent versions as many as you need Differ in URL Slowly transition
  • 19. Networking Classic: layered, partitioned, ops controlled firewalls Cloud: flatter networks, programmatic firewalls Firewalls also happen at server level A PaaS manages this for you
  • 20. Hybrid Networking Need: cloud apps, but some “behind firewall data” Solutions: - replicate data - VPN - firewall rules on private network (fixed IPs) that expose select services
  • 21. Use A CDN CDN=Content Delivery Network Fight latency Move static/cacheable content to CDN edge nodes Examples: Amazon Cloudfront, Cachefly
  • 22. Shift to cloud -> shift to remote servers (sometimes) Some users latency sensitive Use a CDN with geo-aware DNS (all of them) Bulk of “data” delivered can be cached in some cases
  • 23. CDN == a better cache Use hash based asset paths (framework + build tools help) No expiry caching == Maximum chance of cache hit and low latency Massively improve experience of modern apps
  • 24. Latency Friendly GUIs Web interfaces: lightweight js + background loading (eg backbone.js style) Mobile apps: naturally latency friendly Classic request/response web apps are latency sensitive. Some latency inevitable, pick frameworks wisely
  • 25. Use Cloud automation APIs All types of clouds have apis Make use of them from builds: Deploy time (easy roll back !) Development and testing (multiple environments) Cost saving: only run when needed STOP APP or HIBERNATE Hibernated apps will wake when testers need it (all free apps hibernate)
  • 26. Deploy early and often When it is easy to roll back, it is easy to deploy Deliver smaller changes, more often (data breaking changes, you can take your time !) Risk in deployment is proportional to the time since last deployment Risk = X * (Now - LastDeployment)
  • 27. Continuous Deployment CI == continuous integration Continuous deployment takes the next step Tests + Automation == Lower risk Deploy to “an environment” continuously (may not be production !) Need a “build/test/dev” automation workflow server (eg Jenkins)
  • 28. Continuous Deployment Change Deployment rules source build runtime If only someone had built this !
  • 29. Build Workflow > 400 plugins
  • 31. SOA Same Old Architecture? Got a bad name due to WS-* and Enterprise Vendors Is a very useful approach In use by all modern web companies Just not WS-* ! Build apps as composeable, re-useable services On paas cloud: http + rest
  • 32. SOA Build multi tiered applications Separate out tiers Separate out background vs online GUI vs backoffice functionality UI apps Services WebApp iOS API Accounts Payment Jobs All are just apps on a PaaS
  • 33. SOA Services are still just apps ! They are consumed by other apps Different apps/services can have different release cadences Use CI automation to help keep things in sync HTTP interfaces for your own use (health, business stats) - not just user facing
  • 34. Prefer Stateless Easy to say - hard to do Stateless apps delegate state to: Databases, cookies, cache servers, external services Places state can “hide”: User sessions, caches, frameworks** ** example: grails + spring security
  • 35. Prefer Stateless Session data: Use session service (CloudBees service) - cluster friendly (and transparent) cookies (modulo security) database
  • 36. Maybe Stateful Stateful is actually ok: A cache that can be replaced eg Lift Web Framework not required to be replicated In this case - use “sticky sessions” - session affinity to a server (just a flag on cloudbees) Scale up vs out State is short lived
  • 37. Prefer Stateless Why stateless? Allows fine grained scaling Allows scaling out (as well as up +1 dimension) High Availability Zero downtime deploys Client side UI state (eg mobile, HTML5) makes this easier than ever Why does a server care what tab a user has selected?
  • 38. Prefer Stateless Inevitable: trend towards functional programming (immutability) tracking state and side effects will make all this easier (scala, clojure !)
  • 39. Use fine grained scaling Smaller state-light apps Scale out quickly Autoscale (track stats, ensure SLA being met automatically) (no work for you !) Only pay for what you need
  • 40. REST-api first design Increasingly common to build REST apis first Separate apps for Web, Mobile clients Server side becomes less GUI centric Shift in frameworks - choose wisely Services, like databases, live on, are reused, and composed into new services
  • 41. Use Add-ons Why host your own email service Why host your own monitoring/analysis Rich ecosystem (send grid, new relic, for example)
  • 43. Use Add-ons This is the “re-use” we were “promised” many years ago Finally delivered Compose services together
  • 44. Use Add-ons Worried about lock in? Data services are built on open source, you can always export your data and host it yourself Other services are less “latency sensitive” (eg newrelic is popular for on-prem systems too)
  • 45. Use Natural Sharding Many apps have a “natural” way to split up data if needed either by data (eg accounts) -- or by functionality (services) As a way to scale out, split apps into multiple instances (data) Databases in to shards Cheap and easy to clone environments if needed.
  • 46. Skunkworks “It is easier to ask forgiveness than it is to ask permission” -- Grace Hopper Cost of trying/building is cheap, so you can “just build it” Find a part of your application that could be split off into a cloud service on a paas “ask forgiveness”

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \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