SlideShare una empresa de Scribd logo
1 de 46
©2013 CloudBees, Inc. All Rights Reserved
Design Patterns for the Cloud
Rethinking application design for the Cloud
Cyrille Le Clerc
010DEV.nl
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Speaker
2
Cyrille Le Clerc
@cyrilleleclerc
Open Source
CTO
DevOps, Infra as Code
Solution Architect
Cloud
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
This talk is
3
Greatly inspired by Nicolas de Loof’s presentation
Thanks Nicolas!
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
IaaS, PaaS & SaaS
4
Infrastructure
as a Service
Platform
as a Service
Software
as a Service
Linux + storage
+ network
App runtime
+ middleware
Managed“Traditional” admin
Business App
Managed
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Moving to the cloud
5
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Cloud On Premises
6
Cloud
On PremisesEasy
Maybe difficult
for legacy apps
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Cloud On Premises
6
Cloud
On PremisesEasy
Maybe difficult
for legacy apps
refactor
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Green Field Applications
7
• Can select modern solutions
Most (not all) frameworks are well designed for Cloud
• Started on cloud,
discover and adapt to constraints
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
“Legacy” Applications
8
• Not so modern solutions
old frameworks and patterns may not fit with cloud constraints
• Started on premises, single server
hit cloud constraints
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Scale Out
9
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Scale Up
10
M1 Small M1 Large M3 2 XLarge
•Still possible, but up to a limit
•Not optimal
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Scale Up
10
M1 Small M1 Large M3 2 XLarge
•Still possible, but up to a limit
•Not optimal
Low utilization!
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Scale Up
10
M1 Small M1 Large M3 2 XLarge
•Still possible, but up to a limit
•Not optimal
Then ???Low utilization!
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
M1 Extra Large
• 64 bits
• 15 Gb memory
• 4 Vcore, 2 cpu unit (~2.5Gh)
• 1.6 Tb HD
• aka « your desktop »
11
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Scale out
12
Design for clustering
Scale as you need
Pay as you use
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Multi tenancy - PaaS backstage
13
• Multi tenancy at the app level, not at the OS level
• Slice big servers into slices
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
tomcat
app-x
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Multi Tenancy
• OS level (hypervisor): IaaS
• OS virtualization (cgroups, LXC): PaaS
• Middleware ?
Java 9 to be multi-tenant ?
• Application: SaaS
14
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Be stateless ... if you can
15
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
An Ideal Stateless RestFul World
16
Linear horizontal scaling
But …
• Application / User « conversation » has a state
• Stateless apps often store state in a database!
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
State
Are you really stateless ?
Beware of your framework!
17
Grails
Spring Security
Security Plugins
Http Session
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Really stateless ?
• 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
18
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Fear the File System
19
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Cloud uses Schrödinger FS
20
Looks like it’s alive, but it’s not anymore
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
IaaS / PaaS == Pool of Servers
21
Your host at his time
Your host after a redeployment
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Don’t trust the local FS
22
• File System is ephemeral and NOT distributed ... at least on
Amazon
• Use a storage engine à la Amazon S3
... and see the local FS as a cache
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Singletons aren’t
23
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Singletons aren’t
24
• Most app servers are NOT clusterized with reliable singletons
• Use Cron as a Service like iron.io
... or trust Quartz with a JDBC store
Cloud Service
Architecture
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Latency matters!
25
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Latency Matters
26
tomcat
app-x
120ms
• Inter Continental is common
• EU to us-east-1 latency: 120ms
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Measure
• Chrome Dev Tools
• Google Pagespeed
• YSlow
27
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Improve
• HTTP Headers: Expires & Cache Control
• Use CDNs (Content Delivery Network)
28
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Cloud Services Oriented
Architecture
29
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
*aaS Ecosystem
30
• *aaS is about service, not software
• Integrate services, don’t try to setup your own infrastructure
• Amazon AWS, the place to be for *aaS
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
*aaS Ecosystem
31
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Private Cloud ? Non sense ?
32
• Size matters!
• Ecosystem matters!
• You already delegate hosting!
• Security: humans vs. firewalls
• Cloud is secure
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Design for Failure
33
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
It may Will fail!
34
http://status.cloudbees.com
http://status.aws.amazon.com/
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Design for Failure
35
• Don’t fail if a resource is KO
• Be asynchronous and fault tolerant
• Use messaging
• NoSQL is your friend
SNS SQS
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Deployment patterns
36
Deployment is
a non-event
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
•Git push
•Build
•Test
•Ready for production
•Production
•Git push
•Build
•Test
•Deploy
•Production
Continuous Delivery
37
•Git push
•Build
•Test
Integration Deployment Delivery
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Blue Green Deployment
38
• Martin Fowler: http://martinfowler.com/
bliki/BlueGreenDeployment.html
• Zero Downtime
• Cloud Elasticity → 2x number of
servers during deployment
• NoSQL is your friend
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Feature Toggle Pattern
• Continuous merging in the “trunk”
• Deploy not yet ready code
• Enable / disable features with a switch,
no redeployment, often no restart
39
JMX
persistent
transient
AntiFraudServiceV1Impl
AntiFraudServiceV2Impl
AntiFraudService
DispatchingImpl
AntiFraudService
<<Interface>>
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
A/B Testing
• Test different UI / Features
• Measure the impacy
40
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Canary Testing
• Test new versions on a limited
panel of users
41
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
Thank You!
42
Event sponsor
Monday, June 24, 13
©2013 CloudBees, Inc. All Rights Reserved
43
Questions ?
Monday, June 24, 13

Más contenido relacionado

Más de CloudBees

JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...CloudBees
 
JUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made EasyJUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made EasyCloudBees
 
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and MaintenanceJUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and MaintenanceCloudBees
 
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...CloudBees
 
JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?CloudBees
 
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...CloudBees
 
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data ProjectsJUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data ProjectsCloudBees
 
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...CloudBees
 
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...CloudBees
 
JUC Europe 2015: Enabling Continuous Delivery for Major Retailers
JUC Europe 2015: Enabling Continuous Delivery for Major RetailersJUC Europe 2015: Enabling Continuous Delivery for Major Retailers
JUC Europe 2015: Enabling Continuous Delivery for Major RetailersCloudBees
 
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"CloudBees
 
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...CloudBees
 
JUC Europe 2015: Evolving the Jenkins UI
JUC Europe 2015: Evolving the Jenkins UIJUC Europe 2015: Evolving the Jenkins UI
JUC Europe 2015: Evolving the Jenkins UICloudBees
 
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache Mesos
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache MesosJUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache Mesos
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache MesosCloudBees
 
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...CloudBees
 
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...CloudBees
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...CloudBees
 
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL PluginJUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL PluginCloudBees
 
JUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with JenkinsJUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with JenkinsCloudBees
 
Pimp your jenkins platform with docker - Devops.com 2015/11
Pimp your jenkins platform with docker - Devops.com 2015/11Pimp your jenkins platform with docker - Devops.com 2015/11
Pimp your jenkins platform with docker - Devops.com 2015/11CloudBees
 

Más de CloudBees (20)

JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
JUC Europe 2015: The Famous Cows of Cambridge: A Non-Standard Use Case for Je...
 
JUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made EasyJUC Europe 2015: Jenkins Made Easy
JUC Europe 2015: Jenkins Made Easy
 
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and MaintenanceJUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
 
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
 
JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?JUC Europe 2015: Hey! What Did We Just Release?
JUC Europe 2015: Hey! What Did We Just Release?
 
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...
JUC Europe 2015: Orchestrating Your Pipelines with Jenkins, Python and the Je...
 
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data ProjectsJUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
 
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
JUC Europe 2015: Jenkins-Based Continuous Integration for Heterogeneous Hardw...
 
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...
JUC Europe 2015: Optimizing Your CI: Lessons Learned from a Successful Jenkin...
 
JUC Europe 2015: Enabling Continuous Delivery for Major Retailers
JUC Europe 2015: Enabling Continuous Delivery for Major RetailersJUC Europe 2015: Enabling Continuous Delivery for Major Retailers
JUC Europe 2015: Enabling Continuous Delivery for Major Retailers
 
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
 
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...
JUC Europe 2015: Making Strides towards Enterprise-Scale DevOps...with Jenkin...
 
JUC Europe 2015: Evolving the Jenkins UI
JUC Europe 2015: Evolving the Jenkins UIJUC Europe 2015: Evolving the Jenkins UI
JUC Europe 2015: Evolving the Jenkins UI
 
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache Mesos
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache MesosJUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache Mesos
JUC Europe 2015: Using Infrastructure Nodes Wisely With Jenkins and Apache Mesos
 
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
 
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...
JUC 2015 - Keynote Address and Opening Remarks by Kohsuke Kawaguchi, Founder,...
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
 
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL PluginJUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
 
JUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with JenkinsJUC Europe 2015: A Reproducible Build Environment with Jenkins
JUC Europe 2015: A Reproducible Build Environment with Jenkins
 
Pimp your jenkins platform with docker - Devops.com 2015/11
Pimp your jenkins platform with docker - Devops.com 2015/11Pimp your jenkins platform with docker - Devops.com 2015/11
Pimp your jenkins platform with docker - Devops.com 2015/11
 

Último

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Último (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Design Patterns for The Cloud (010dev Rotterdam)

  • 1. ©2013 CloudBees, Inc. All Rights Reserved Design Patterns for the Cloud Rethinking application design for the Cloud Cyrille Le Clerc 010DEV.nl Monday, June 24, 13
  • 2. ©2013 CloudBees, Inc. All Rights Reserved Speaker 2 Cyrille Le Clerc @cyrilleleclerc Open Source CTO DevOps, Infra as Code Solution Architect Cloud Monday, June 24, 13
  • 3. ©2013 CloudBees, Inc. All Rights Reserved This talk is 3 Greatly inspired by Nicolas de Loof’s presentation Thanks Nicolas! Monday, June 24, 13
  • 4. ©2013 CloudBees, Inc. All Rights Reserved IaaS, PaaS & SaaS 4 Infrastructure as a Service Platform as a Service Software as a Service Linux + storage + network App runtime + middleware Managed“Traditional” admin Business App Managed Monday, June 24, 13
  • 5. ©2013 CloudBees, Inc. All Rights Reserved Moving to the cloud 5 Monday, June 24, 13
  • 6. ©2013 CloudBees, Inc. All Rights Reserved Cloud On Premises 6 Cloud On PremisesEasy Maybe difficult for legacy apps Monday, June 24, 13
  • 7. ©2013 CloudBees, Inc. All Rights Reserved Cloud On Premises 6 Cloud On PremisesEasy Maybe difficult for legacy apps refactor Monday, June 24, 13
  • 8. ©2013 CloudBees, Inc. All Rights Reserved Green Field Applications 7 • Can select modern solutions Most (not all) frameworks are well designed for Cloud • Started on cloud, discover and adapt to constraints Monday, June 24, 13
  • 9. ©2013 CloudBees, Inc. All Rights Reserved “Legacy” Applications 8 • Not so modern solutions old frameworks and patterns may not fit with cloud constraints • Started on premises, single server hit cloud constraints Monday, June 24, 13
  • 10. ©2013 CloudBees, Inc. All Rights Reserved Scale Out 9 Monday, June 24, 13
  • 11. ©2013 CloudBees, Inc. All Rights Reserved Scale Up 10 M1 Small M1 Large M3 2 XLarge •Still possible, but up to a limit •Not optimal Monday, June 24, 13
  • 12. ©2013 CloudBees, Inc. All Rights Reserved Scale Up 10 M1 Small M1 Large M3 2 XLarge •Still possible, but up to a limit •Not optimal Low utilization! Monday, June 24, 13
  • 13. ©2013 CloudBees, Inc. All Rights Reserved Scale Up 10 M1 Small M1 Large M3 2 XLarge •Still possible, but up to a limit •Not optimal Then ???Low utilization! Monday, June 24, 13
  • 14. ©2013 CloudBees, Inc. All Rights Reserved M1 Extra Large • 64 bits • 15 Gb memory • 4 Vcore, 2 cpu unit (~2.5Gh) • 1.6 Tb HD • aka « your desktop » 11 Monday, June 24, 13
  • 15. ©2013 CloudBees, Inc. All Rights Reserved Scale out 12 Design for clustering Scale as you need Pay as you use Monday, June 24, 13
  • 16. ©2013 CloudBees, Inc. All Rights Reserved Multi tenancy - PaaS backstage 13 • Multi tenancy at the app level, not at the OS level • Slice big servers into slices tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x tomcat app-x Monday, June 24, 13
  • 17. ©2013 CloudBees, Inc. All Rights Reserved Multi Tenancy • OS level (hypervisor): IaaS • OS virtualization (cgroups, LXC): PaaS • Middleware ? Java 9 to be multi-tenant ? • Application: SaaS 14 Monday, June 24, 13
  • 18. ©2013 CloudBees, Inc. All Rights Reserved Be stateless ... if you can 15 Monday, June 24, 13
  • 19. ©2013 CloudBees, Inc. All Rights Reserved An Ideal Stateless RestFul World 16 Linear horizontal scaling But … • Application / User « conversation » has a state • Stateless apps often store state in a database! Monday, June 24, 13
  • 20. ©2013 CloudBees, Inc. All Rights Reserved State Are you really stateless ? Beware of your framework! 17 Grails Spring Security Security Plugins Http Session Monday, June 24, 13
  • 21. ©2013 CloudBees, Inc. All Rights Reserved Really stateless ? • 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 18 Monday, June 24, 13
  • 22. ©2013 CloudBees, Inc. All Rights Reserved Fear the File System 19 Monday, June 24, 13
  • 23. ©2013 CloudBees, Inc. All Rights Reserved Cloud uses Schrödinger FS 20 Looks like it’s alive, but it’s not anymore Monday, June 24, 13
  • 24. ©2013 CloudBees, Inc. All Rights Reserved IaaS / PaaS == Pool of Servers 21 Your host at his time Your host after a redeployment Monday, June 24, 13
  • 25. ©2013 CloudBees, Inc. All Rights Reserved Don’t trust the local FS 22 • File System is ephemeral and NOT distributed ... at least on Amazon • Use a storage engine à la Amazon S3 ... and see the local FS as a cache Monday, June 24, 13
  • 26. ©2013 CloudBees, Inc. All Rights Reserved Singletons aren’t 23 Monday, June 24, 13
  • 27. ©2013 CloudBees, Inc. All Rights Reserved Singletons aren’t 24 • Most app servers are NOT clusterized with reliable singletons • Use Cron as a Service like iron.io ... or trust Quartz with a JDBC store Cloud Service Architecture Monday, June 24, 13
  • 28. ©2013 CloudBees, Inc. All Rights Reserved Latency matters! 25 Monday, June 24, 13
  • 29. ©2013 CloudBees, Inc. All Rights Reserved Latency Matters 26 tomcat app-x 120ms • Inter Continental is common • EU to us-east-1 latency: 120ms Monday, June 24, 13
  • 30. ©2013 CloudBees, Inc. All Rights Reserved Measure • Chrome Dev Tools • Google Pagespeed • YSlow 27 Monday, June 24, 13
  • 31. ©2013 CloudBees, Inc. All Rights Reserved Improve • HTTP Headers: Expires & Cache Control • Use CDNs (Content Delivery Network) 28 Monday, June 24, 13
  • 32. ©2013 CloudBees, Inc. All Rights Reserved Cloud Services Oriented Architecture 29 Monday, June 24, 13
  • 33. ©2013 CloudBees, Inc. All Rights Reserved *aaS Ecosystem 30 • *aaS is about service, not software • Integrate services, don’t try to setup your own infrastructure • Amazon AWS, the place to be for *aaS Monday, June 24, 13
  • 34. ©2013 CloudBees, Inc. All Rights Reserved *aaS Ecosystem 31 Monday, June 24, 13
  • 35. ©2013 CloudBees, Inc. All Rights Reserved Private Cloud ? Non sense ? 32 • Size matters! • Ecosystem matters! • You already delegate hosting! • Security: humans vs. firewalls • Cloud is secure Monday, June 24, 13
  • 36. ©2013 CloudBees, Inc. All Rights Reserved Design for Failure 33 Monday, June 24, 13
  • 37. ©2013 CloudBees, Inc. All Rights Reserved It may Will fail! 34 http://status.cloudbees.com http://status.aws.amazon.com/ Monday, June 24, 13
  • 38. ©2013 CloudBees, Inc. All Rights Reserved Design for Failure 35 • Don’t fail if a resource is KO • Be asynchronous and fault tolerant • Use messaging • NoSQL is your friend SNS SQS Monday, June 24, 13
  • 39. ©2013 CloudBees, Inc. All Rights Reserved Deployment patterns 36 Deployment is a non-event Monday, June 24, 13
  • 40. ©2013 CloudBees, Inc. All Rights Reserved •Git push •Build •Test •Ready for production •Production •Git push •Build •Test •Deploy •Production Continuous Delivery 37 •Git push •Build •Test Integration Deployment Delivery Monday, June 24, 13
  • 41. ©2013 CloudBees, Inc. All Rights Reserved Blue Green Deployment 38 • Martin Fowler: http://martinfowler.com/ bliki/BlueGreenDeployment.html • Zero Downtime • Cloud Elasticity → 2x number of servers during deployment • NoSQL is your friend Monday, June 24, 13
  • 42. ©2013 CloudBees, Inc. All Rights Reserved Feature Toggle Pattern • Continuous merging in the “trunk” • Deploy not yet ready code • Enable / disable features with a switch, no redeployment, often no restart 39 JMX persistent transient AntiFraudServiceV1Impl AntiFraudServiceV2Impl AntiFraudService DispatchingImpl AntiFraudService <<Interface>> Monday, June 24, 13
  • 43. ©2013 CloudBees, Inc. All Rights Reserved A/B Testing • Test different UI / Features • Measure the impacy 40 Monday, June 24, 13
  • 44. ©2013 CloudBees, Inc. All Rights Reserved Canary Testing • Test new versions on a limited panel of users 41 Monday, June 24, 13
  • 45. ©2013 CloudBees, Inc. All Rights Reserved Thank You! 42 Event sponsor Monday, June 24, 13
  • 46. ©2013 CloudBees, Inc. All Rights Reserved 43 Questions ? Monday, June 24, 13