Cloud patterns - softshake 2013
Upcoming SlideShare
Loading in...5
×
 

Cloud patterns - softshake 2013

on

  • 1,321 views

Architecture constraints and benefits for Cloud applications

Architecture constraints and benefits for Cloud applications

Statistics

Views

Total Views
1,321
Views on SlideShare
1,294
Embed Views
27

Actions

Likes
6
Downloads
23
Comments
0

3 Embeds 27

https://twitter.com 14
http://tspace.web.att.com 12
http://www.linkedin.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Cloud patterns - softshake 2013 Cloud patterns - softshake 2013 Presentation Transcript

  • Cloud Patterns Nicolas De Loof - cloudbees ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 1
  • {{ This talk is a mashup • « PaaS design » Michael Neale, CloudBees • « Cloud Best practices » Eric Bottard, VMWare • my own … ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • <me> ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ }} ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 5
  • {{ Support engineer ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ }} Support engineer suré cen ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ }} Support engineer suré cen ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Maven & Jenkins committer ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ }} JUG Leader ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • </me> ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ End Users Application Developers Infrastructure Architects SaaS PaaS IaaS SaaS PaaS IaaS ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }} Thousands Applications A Dozen platforms Few world-scale providers
  • {{ }} May be difficult for legacy apps Cloud easy On premises ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Cloud easy refactor On premises ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }} May be difficult for legacy apps
  • {{ Green field applications • Can select modern solutions most (not all) frameworks are well designed for Cloud }} • Started on cloud, discovers and adapts to constraints à devoxx.be 2013 ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ « Classic » applications • Started on premises, single server, hit cloud constraints ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }} • Not such modern solutions common frameworks may not fit cloud constraints
  • {{ The Devoxx 2012 apps • Call for Paper and Registration • High traffic two months a year • Self hosted (parleys.com infra) moved to CloudBees PaaS • Wicket, Spring, MySQL No hype, like 99% java applications ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • Scale Sc Out ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Scale up M1 small ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Scale up M1 small M1 large ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Scale up M1 small M1 large M3 double extra large ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Scale up }} Then ? M1 small M1 large M3 double extra large ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Scale up • Still possible, but will hit a limit • Not optimal }} Then ? M1 small M1 large M3 double extra large ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ M1 extra large • • • • 64 bits 15 Gb memory 4 Vcore, 2 cpu unit (~2.5Gh) 1.6 Tb HD aka « my personnal laptop » ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Scale out Design for clustering Adapt resources to actual load Pay only for actual use ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • • slice a server into cells • Multi-tenant app hosting vitrualisation {{ What a PaaS actually does … M1 large ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • • slice a server into cells • Multi-tenant app hosting vitrualisation {{ What a PaaS actually does … M1 large ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Multi-tenancy • Hardware level (IaaS) • OS level (hypervisor) • OS virtualization (cgroups, LXC) • Middleware ? Java 9 to be multi-tenant ? ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • be State Less … if you can ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ RESTFul, Stateless • Linear horizontal scaling But … • Application - User « conversation » has a state • Stateless apps mostly use caches then cache needs to be distributed ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Stateless, really ? • Beware your frameworks ! Grails ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Stateless, really ? • Beware your frameworks ! Grails security plugin ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Stateless, really ? • Beware your frameworks ! Grails security plugin Spring-security ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Stateless, really ? • Beware your frameworks ! State Grails security plugin Spring-security HttpSession ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Does Stateless really exist ? • Client side state with browser cookies à higher network traffic, security • Use http session (servlet frameworks) à memcache session replication à sticky session • Use a central service (DB) à SPoF, DB scalability ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • beware Lock-in Prefer portable API ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Standards • Use standard, portable APIs (aka Java EE, the good parts) }} • Set runtime configuration via env variables / system properties • at least use some abstraction to insulate vendorspecific code ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Some Standards • • • • • • • Java EE Java Servlet JVM LAMP Node.js RVM .. ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • Beware File System ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Cloud uses Schrödinger FS Looks like it’s alive, but it’s not ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ PaaS != Hosted servers Your host at this time ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ PaaS != Hosted servers Your host at this time Your host after (re)deployment ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ FileSystem is ephemeral (and not distributed) File system is not persistent, neither distributed }} Use storage engine à la Amazon S3 (or DB BLOB) ... and see local FileSystem as a convenient cache ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • Singletons … aren’t ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Sample: Quartz Job Scheduler Job will be triggered on all nodes ! ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Sample: Quartz Job Scheduler Job will be triggered on all nodes ! à Use Persistent (JDBC) Job Store ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Sample: Quartz Job Scheduler Job will be triggered on all nodes ! à Use Persistent (JDBC) Job Store ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Sample: Quartz Job Scheduler Job will be triggered on all nodes ! à Use Persistent (JDBC) Job Store à Use dedicated cron service ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • Latency matters ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ • app-x tomcat }} Inter Continental is common • EU to us-east-1 latency: 120ms ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Measure • Chrome DEV Tools • Google Pagespeed • YSlow ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Improve • Use HTTP cache headers • Use unique path per deployment hash, or just ?version= • Use a CDN ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • Migrate to Cloud ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • Yes! ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • SOA (the right way) ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ }} Small is beautifull • small, specialized, elastic services • Communicate with REST on HTTP (sync) MQ (async) frontend Users Backend ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 indexer
  • Consume Services ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ *aaS ecosystem • *aaS is about service, not software • Integrate services, don’t try to setup your own infrastructure • AWS, the place to be for *aaS ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ *aaS ecosystem ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }} 44
  • {{ Private Cloud ? ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }} 45
  • {{ Private cloud is non-sense • Do you produce your own electricity ? • Security is about humans, not firewalls ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • Design for Failure ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ It May Will fail ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Beware resource • Don’t hang the app when resource fails • Be asynchronous and fault tolerant • Use Messaging ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • Cloud Safer is anyway ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Some metrics • In 2012, CloudBees suffered 2 major outages 20 then 10 minutes à 99,99% (What’s your actual availability rate ?) Cloud outages are visible ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Disaster recovery • All deployed artifact à S3 • DB on EBS, then daily à S3 + your own backup strategy http://wiki.cloudbees.com/bin/view/Documentation/BackupPolicies ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Need more ? • Multi-zone High-Availability • Mutli-region redundency }} à data sync to handle network latency à Short TTL DNS  turn key » solution No « ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • Ops for Cloud ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Infra is managed ... not app • Need to instrument and monitor ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Ops for Cloud apps One team, One goal, One platform ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Cloud is the best place to embrace DevOps Traditional Cloud Environment DEV / INT / PROD identical Delivery Mostly manual full automation API based DEV Process Fire and forget Continuous delivery Team Dev vs Ops vs QA DevOps ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • Continuous delivery Integration deployment ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Continuous … Integration Deployment Delivery • Git push • Build • Test • Git push • Build • Test • Deploy • Production ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }} • Git push • Build • Test • Ready for production • Production
  • concurrent deployment 0 downtime ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ 0 downtime http://demo.nicolas.cloudbees.net rout ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ 0 downtime http://demo.nicolas.cloudbees.net rout ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ 0 downtime http://demo.nicolas.cloudbees.net rout ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ 0 downtime http://demo.nicolas.cloudbees.net rout ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Resources migration App Vn running DB schema Vn App Vn+1 starting ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Resources migration App Vn running DB schema Vn App Vn+1 starting DB schema Vn+1 ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ }} ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ • Vn+1 schema to be Vn compatible • Vn+2 can do some cleanup i.e. « @deprecated » for DB Or … temporary deploy a « maintenance » page ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • Deployment event Is not an anymore ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13
  • {{ Green / Blue http://martinfowler.com/bliki/BlueGreenDeployment.html ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ A/B testing ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Canary testing ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • {{ Pretotyping ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13 }}
  • thank You ©2013 CloudBees, Inc. All Rights Reserved jeudi 24 octobre 13