SlideShare a Scribd company logo
1 of 42
HOW TO
SCALE YOUR
APP AND WIN
THE CLOUD
CHALLENGE
QUENTIN ADAM
@WAXZCE
2013
Quentin ADAM
Clever Cloud CEO
@waxzce on twitter
http://www.waxzce.org
WHO I AM ?
Java, scala, python, nodejs, php… apps scaling automatically in the cloud.
We cover your ass, you can focus on your own stuff
http://www.clever-cloud.com
PAAS PROVIDER
WHEN YOU
NEED TO
SCALE
THERE ARE 2 WAYS
GROWING AND GROWING
UNTIL YOU EXPLODE OR
BECOME WEIRD
OR SPLIT THE WORK AND
MAKE YOUR SOFTWARE
WORK AS A TEAM
Build an army of fat app
YOU CAN DO BOTH
SO WE NEED TO BE ABLE
TO DISPATCH THE WORK
SCALE OUT
• Many workers
doing the same
thing
• No SPOF
• Growing is more
easy
• Introduce best
practice
SCALE UP
• 1 Fat instance
• 1 Fat application
• SPOF (single point
of failure)
• Hard to maintain
• Always has a limit
• Short term
meaning
SO, HOW TO
SCALE OUT
?
JUST SOME FACTS
SPLIT PROCESS AND
STORAGE
Storage
• Databases
• Files
• Sessions
• Events
• …
Code
• Can be replicated
• Stateless
• Process
Picking one instance or another doesn’t matter
STATELESSNESS IS THE KEY
CONSIDER MORE
THINGS AS DATA
• User account
• Users data
• Files
• Sessions
• Events
CHOOSE
DATASTORE
WISELY
YOU CAN SHOULD USE MANY DATASTORES
DATASTORE CHOICES
ARE DRIVEN BY USAGE
Make
decisions
based on
needs
Do I need
atomicity of
requests ?
Do I need
concurrent
access ?
Do I mostly
read or
write ?
Do I need
relational ?
Do I need
big storage
capacity ?
Do I need
high
availability ?
• Not a big volume
• DB have to manage
data TTL
• Data model : K/V
• Multiple writes at the
same time
• High availability
I need to store sessions
QUICK EXAMPLE
• Not a big volume
It’s OK, PG can handle
small quantity of data
• DB have to manage
data TTL
No, I have to do it
manually
• Data model : K/V
No, PG is relational
(mainly)
• Multiple writes at the
same time
No, PG is Atomic
• High availability
PG is awesome ;-) Use
of PG bouncer or
similar allow good
clustering
I need to store sessions
QUICK EXAMPLE
• Not a big volume
It’s OK, redis can
handle small quantity
of data
• DB have to manage
data TTL
Yes Redis can do it
• Data model : K/V Yes
• Multiple writes at the
same time
No, redis is pseudo
Atomic (master/slave)
• High availability
Redis is great, but
cauterization is rude…
I need to store sessions
QUICK EXAMPLE
• Not a big volume
It’s OK, CB can handle
small quantity of data
• DB have to manage
data TTL
Yes CB can do it
• Data model : K/V Yes
• Multiple writes at the
same time
OK, this is possible
with memcached
protocol
• High availability
Clustering is built in, no
downtime 
I need to store sessions
QUICK EXAMPLE
USE ONLINE
DATABASE / BE
READY TO TEST
IN JUST A FEW
MINUTES
NO NEED TO TRASH YOUR COMPUTER
DON’T BE THAT GUY
DO NOT USE A
TECHNOLOGY BECAUSE
YOU <3 IT OR BECAUSE
IT’S HYPE : USE IT
BECAUSE IT FITS YOUR
NEEDS
BALANCE YOUR LEARNING CURVE WITH
THE TIME SAVED
DO NOT CREATE MONSTERS
COMMON MISTAKES
DO NOT USE
MEMORY AS
DATABASE
LIKE : SHARED / GLOBAL VARIABLE,
CACHE “IN THE CODE”, INTENSIVE
SESSION USAGE…
DO NOT USE A VARIABLE
FOR MORE THAN ONE
REQUEST
2 + 2 = 4
FOR SAME INPUT, SAME OUTPUT
GET do not change data on server
BE HTTP CONSISTENT
And data will be lost
CODE WILL FAIL
DO NOT USE FILE
SYSTEM AS DATASTORE
File system are POSIX compliant
• POSIX is ACID
• POSIX is powerful but is bottleneck
• File System is nightmare of ops
• File System is create coupling (host provider/OS/language)
• Free SPOF multi tenant File System is a unicorn
STORE IN DATABASE, OR DATASTORE LIKE S3 (AWS)
DEDICATED TO FILE MANAGEMENT
CAREFUL USE OF
DARK MAGIC
SPLIT THE CODE :
MODULES
• Smallest code
base
• Deploy as
service for
each other
• Focus on best
technology for
a problem
SCALE YOUR TEAM
MODULARIZE YOUR TEAM
USE EVENT BROKER TO
MODULARIZE YOUR APP
• AMQP
• Celery
• 0MQ
• Redis
• JMS
• Some case : hadoop, akka…
• …
CRON is not an event queue
MAKE HARD
COMPUTATION ASYNC
ALWAYS USE A
REVERSE PROXY
Y U NOT USE ONE ?
DO NOT BUILD “THE
SERVER” WITH NO DOC
USE PROCESS
DEPLOYMENT
EASY MOVING OR
INCIDENT MANAGEMENT
KEEP CALM UNDER FIRE
TRACK BUG & GET METRICS
Quentin ADAM
Twitter : @waxzce
THX FOR LISTENING
& QUESTIONS TIME

More Related Content

What's hot

What's hot (20)

The end of server management : hosting have to become a commodity - #devoxxPL...
The end of server management : hosting have to become a commodity - #devoxxPL...The end of server management : hosting have to become a commodity - #devoxxPL...
The end of server management : hosting have to become a commodity - #devoxxPL...
 
Immutability: from code to infrastructure, the way to scalability - Voxxed Da...
Immutability: from code to infrastructure, the way to scalability - Voxxed Da...Immutability: from code to infrastructure, the way to scalability - Voxxed Da...
Immutability: from code to infrastructure, the way to scalability - Voxxed Da...
 
Immutability: from code to infrastructure, the way of scalability - snowcamp ...
Immutability: from code to infrastructure, the way of scalability - snowcamp ...Immutability: from code to infrastructure, the way of scalability - snowcamp ...
Immutability: from code to infrastructure, the way of scalability - snowcamp ...
 
How to manage large amounts of data with Iteratee - ScalaDays Berlin 2014
How to manage large amounts of data with Iteratee - ScalaDays Berlin 2014How to manage large amounts of data with Iteratee - ScalaDays Berlin 2014
How to manage large amounts of data with Iteratee - ScalaDays Berlin 2014
 
Active Directory - TIAD Camp Microsoft Cloud Readiness
Active Directory - TIAD Camp Microsoft Cloud ReadinessActive Directory - TIAD Camp Microsoft Cloud Readiness
Active Directory - TIAD Camp Microsoft Cloud Readiness
 
Demystifying FME and the Cloud
Demystifying FME and the CloudDemystifying FME and the Cloud
Demystifying FME and the Cloud
 
DEV+OPS: How to automate infrastructure - Cloud Expo Europe 2016
DEV+OPS: How to automate infrastructure - Cloud Expo Europe 2016DEV+OPS: How to automate infrastructure - Cloud Expo Europe 2016
DEV+OPS: How to automate infrastructure - Cloud Expo Europe 2016
 
June 2017 Denver AWS Users' Group intro slides
June 2017 Denver AWS Users' Group intro slidesJune 2017 Denver AWS Users' Group intro slides
June 2017 Denver AWS Users' Group intro slides
 
Serverless Empowering people
Serverless Empowering peopleServerless Empowering people
Serverless Empowering people
 
Denver AWS Meetup - March 2019 slides
Denver AWS Meetup - March 2019 slidesDenver AWS Meetup - March 2019 slides
Denver AWS Meetup - March 2019 slides
 
The End of server management - Continuous delivery meetup Paris
The End of server management  - Continuous delivery meetup ParisThe End of server management  - Continuous delivery meetup Paris
The End of server management - Continuous delivery meetup Paris
 
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest BRETAGNE
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest BRETAGNELe DevOps, levier d'automatisation et de passage au cloud - ADN Ouest BRETAGNE
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest BRETAGNE
 
Intro to Serverless AWS Web Apps
Intro to Serverless AWS Web AppsIntro to Serverless AWS Web Apps
Intro to Serverless AWS Web Apps
 
Designing for elasticity on AWS
Designing for elasticity on AWSDesigning for elasticity on AWS
Designing for elasticity on AWS
 
Understand immutable infrastructure, what? Why? how? - devops d day Marseill...
 Understand immutable infrastructure, what? Why? how? - devops d day Marseill... Understand immutable infrastructure, what? Why? how? - devops d day Marseill...
Understand immutable infrastructure, what? Why? how? - devops d day Marseill...
 
Getting to Cloud Nine: Container, Cloud and Serverless Migration Strategies
Getting to Cloud Nine: Container, Cloud and Serverless Migration StrategiesGetting to Cloud Nine: Container, Cloud and Serverless Migration Strategies
Getting to Cloud Nine: Container, Cloud and Serverless Migration Strategies
 
AWS Summit Berlin 2013 - doo - A Scalable Sync Framework Infrastructure based...
AWS Summit Berlin 2013 - doo - A Scalable Sync Framework Infrastructure based...AWS Summit Berlin 2013 - doo - A Scalable Sync Framework Infrastructure based...
AWS Summit Berlin 2013 - doo - A Scalable Sync Framework Infrastructure based...
 
Ordina SOFTC Presentation - Moving a legacy application into the cloud
Ordina SOFTC Presentation - Moving a legacy application into the cloudOrdina SOFTC Presentation - Moving a legacy application into the cloud
Ordina SOFTC Presentation - Moving a legacy application into the cloud
 
Cloud based development cit-2017
Cloud based development cit-2017Cloud based development cit-2017
Cloud based development cit-2017
 
Cloud based mobile app development cit 2017
Cloud based mobile app development cit 2017Cloud based mobile app development cit 2017
Cloud based mobile app development cit 2017
 

Similar to How to scale your app and win the cloud challenge

Some advice from the guy who handle your applications uptime - scalaIO 2013
Some advice from the guy who handle your applications uptime - scalaIO 2013Some advice from the guy who handle your applications uptime - scalaIO 2013
Some advice from the guy who handle your applications uptime - scalaIO 2013
Quentin Adam
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Cal Henderson
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
guest18a0f1
 
Scaling SQL Write-Master Database Clusters With Redis Labs: Erik Brandsberg
Scaling SQL Write-Master Database Clusters With Redis Labs: Erik BrandsbergScaling SQL Write-Master Database Clusters With Redis Labs: Erik Brandsberg
Scaling SQL Write-Master Database Clusters With Redis Labs: Erik Brandsberg
Redis Labs
 

Similar to How to scale your app and win the cloud challenge (20)

Dotscale2013 : How to scale ?
Dotscale2013 : How to scale ?Dotscale2013 : How to scale ?
Dotscale2013 : How to scale ?
 
Some advice from the guy who handle your applications uptime - scalaIO 2013
Some advice from the guy who handle your applications uptime - scalaIO 2013Some advice from the guy who handle your applications uptime - scalaIO 2013
Some advice from the guy who handle your applications uptime - scalaIO 2013
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Immutability: from code to infrastructure, the way to scalability - Breizhca...
 Immutability: from code to infrastructure, the way to scalability - Breizhca... Immutability: from code to infrastructure, the way to scalability - Breizhca...
Immutability: from code to infrastructure, the way to scalability - Breizhca...
 
Scaling SQL Write-Master Database Clusters With Redis Labs: Erik Brandsberg
Scaling SQL Write-Master Database Clusters With Redis Labs: Erik BrandsbergScaling SQL Write-Master Database Clusters With Redis Labs: Erik Brandsberg
Scaling SQL Write-Master Database Clusters With Redis Labs: Erik Brandsberg
 
FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...
FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...
FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...
 
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
 
From delivering plugins to delivering "as a Service" - Atlassian connect 2017
From delivering plugins to delivering "as a Service" - Atlassian connect 2017From delivering plugins to delivering "as a Service" - Atlassian connect 2017
From delivering plugins to delivering "as a Service" - Atlassian connect 2017
 
Elastic Data Analytics Platform @Datadog
Elastic Data Analytics Platform @DatadogElastic Data Analytics Platform @Datadog
Elastic Data Analytics Platform @Datadog
 
Spring in the Cloud
Spring in the CloudSpring in the Cloud
Spring in the Cloud
 
Agile Data: Building Hadoop Analytics Applications
Agile Data: Building Hadoop Analytics ApplicationsAgile Data: Building Hadoop Analytics Applications
Agile Data: Building Hadoop Analytics Applications
 
Caching strategies with lucee
Caching strategies with luceeCaching strategies with lucee
Caching strategies with lucee
 
Big Data, Ingeniería de datos, y Data Lakes en AWS
Big Data, Ingeniería de datos, y Data Lakes en AWSBig Data, Ingeniería de datos, y Data Lakes en AWS
Big Data, Ingeniería de datos, y Data Lakes en AWS
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014
 
Agile Data Science: Building Hadoop Analytics Applications
Agile Data Science: Building Hadoop Analytics ApplicationsAgile Data Science: Building Hadoop Analytics Applications
Agile Data Science: Building Hadoop Analytics Applications
 
Hive at booking
Hive at bookingHive at booking
Hive at booking
 

More from Quentin Adam

Why all my software projects are late?
Why all my software projects are late?Why all my software projects are late?
Why all my software projects are late?
Quentin Adam
 

More from Quentin Adam (20)

Biscuit, the cryptotoken you can share safely with your ap is
Biscuit, the cryptotoken you can share safely with your ap isBiscuit, the cryptotoken you can share safely with your ap is
Biscuit, the cryptotoken you can share safely with your ap is
 
Keynot Cloud Expo Intel
Keynot Cloud Expo IntelKeynot Cloud Expo Intel
Keynot Cloud Expo Intel
 
Pulsar 101 at devoxx
Pulsar 101 at devoxxPulsar 101 at devoxx
Pulsar 101 at devoxx
 
Traversing hyper driven developpement to do great technical choices and make ...
Traversing hyper driven developpement to do great technical choices and make ...Traversing hyper driven developpement to do great technical choices and make ...
Traversing hyper driven developpement to do great technical choices and make ...
 
How to make people work together? - ending keynote - devfest du bout du monde...
How to make people work together? - ending keynote - devfest du bout du monde...How to make people work together? - ending keynote - devfest du bout du monde...
How to make people work together? - ending keynote - devfest du bout du monde...
 
Remove centralization on Authorization - API Days Paris 2018 (announcement fo...
Remove centralization on Authorization - API Days Paris 2018 (announcement fo...Remove centralization on Authorization - API Days Paris 2018 (announcement fo...
Remove centralization on Authorization - API Days Paris 2018 (announcement fo...
 
PostgreSQL is the new NoSQL - at Devoxx 2018
PostgreSQL is the new NoSQL  - at Devoxx 2018PostgreSQL is the new NoSQL  - at Devoxx 2018
PostgreSQL is the new NoSQL - at Devoxx 2018
 
Hype driven architecture - keynote at devfest Toulouse 2018
Hype driven architecture - keynote at devfest Toulouse 2018Hype driven architecture - keynote at devfest Toulouse 2018
Hype driven architecture - keynote at devfest Toulouse 2018
 
Real world code, why are you so ashamed? - RivieraDev 2018
Real world code, why are you so ashamed? - RivieraDev 2018Real world code, why are you so ashamed? - RivieraDev 2018
Real world code, why are you so ashamed? - RivieraDev 2018
 
Monitorer l'inconnu, 1000 * 100 series par jour - talk avec @clementd à #devo...
Monitorer l'inconnu, 1000 * 100 series par jour - talk avec @clementd à #devo...Monitorer l'inconnu, 1000 * 100 series par jour - talk avec @clementd à #devo...
Monitorer l'inconnu, 1000 * 100 series par jour - talk avec @clementd à #devo...
 
Comment les contrôleurs de gestion ont fuck up mon IT - Lean Kanban France 2017
Comment les contrôleurs de gestion ont fuck up mon IT - Lean Kanban France 2017Comment les contrôleurs de gestion ont fuck up mon IT - Lean Kanban France 2017
Comment les contrôleurs de gestion ont fuck up mon IT - Lean Kanban France 2017
 
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
 
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
Problems you’ll face in the Microservices World: Configuration, Authenticatio...Problems you’ll face in the Microservices World: Configuration, Authenticatio...
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
 
MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017
MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017
MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017
 
Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...
Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...
Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...
 
What is Clever Cloud?
What is Clever Cloud?What is Clever Cloud?
What is Clever Cloud?
 
Why all my software projects are late?
Why all my software projects are late?Why all my software projects are late?
Why all my software projects are late?
 
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
 
What is systemd? Why use it? how does it work? - breizhcamp
What is systemd? Why use it? how does it work? - breizhcampWhat is systemd? Why use it? how does it work? - breizhcamp
What is systemd? Why use it? how does it work? - breizhcamp
 
Happy dev ... & ops
Happy dev ... & opsHappy dev ... & ops
Happy dev ... & ops
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

How to scale your app and win the cloud challenge

  • 1. HOW TO SCALE YOUR APP AND WIN THE CLOUD CHALLENGE QUENTIN ADAM @WAXZCE 2013
  • 2. Quentin ADAM Clever Cloud CEO @waxzce on twitter http://www.waxzce.org WHO I AM ?
  • 3. Java, scala, python, nodejs, php… apps scaling automatically in the cloud. We cover your ass, you can focus on your own stuff http://www.clever-cloud.com PAAS PROVIDER
  • 5. GROWING AND GROWING UNTIL YOU EXPLODE OR BECOME WEIRD
  • 6. OR SPLIT THE WORK AND MAKE YOUR SOFTWARE WORK AS A TEAM
  • 7. Build an army of fat app YOU CAN DO BOTH
  • 8. SO WE NEED TO BE ABLE TO DISPATCH THE WORK SCALE OUT • Many workers doing the same thing • No SPOF • Growing is more easy • Introduce best practice SCALE UP • 1 Fat instance • 1 Fat application • SPOF (single point of failure) • Hard to maintain • Always has a limit • Short term meaning
  • 9. SO, HOW TO SCALE OUT ? JUST SOME FACTS
  • 10. SPLIT PROCESS AND STORAGE Storage • Databases • Files • Sessions • Events • … Code • Can be replicated • Stateless • Process
  • 11. Picking one instance or another doesn’t matter STATELESSNESS IS THE KEY
  • 12. CONSIDER MORE THINGS AS DATA • User account • Users data • Files • Sessions • Events
  • 14. DATASTORE CHOICES ARE DRIVEN BY USAGE Make decisions based on needs Do I need atomicity of requests ? Do I need concurrent access ? Do I mostly read or write ? Do I need relational ? Do I need big storage capacity ? Do I need high availability ?
  • 15. • Not a big volume • DB have to manage data TTL • Data model : K/V • Multiple writes at the same time • High availability I need to store sessions QUICK EXAMPLE
  • 16. • Not a big volume It’s OK, PG can handle small quantity of data • DB have to manage data TTL No, I have to do it manually • Data model : K/V No, PG is relational (mainly) • Multiple writes at the same time No, PG is Atomic • High availability PG is awesome ;-) Use of PG bouncer or similar allow good clustering I need to store sessions QUICK EXAMPLE
  • 17. • Not a big volume It’s OK, redis can handle small quantity of data • DB have to manage data TTL Yes Redis can do it • Data model : K/V Yes • Multiple writes at the same time No, redis is pseudo Atomic (master/slave) • High availability Redis is great, but cauterization is rude… I need to store sessions QUICK EXAMPLE
  • 18. • Not a big volume It’s OK, CB can handle small quantity of data • DB have to manage data TTL Yes CB can do it • Data model : K/V Yes • Multiple writes at the same time OK, this is possible with memcached protocol • High availability Clustering is built in, no downtime  I need to store sessions QUICK EXAMPLE
  • 19. USE ONLINE DATABASE / BE READY TO TEST IN JUST A FEW MINUTES NO NEED TO TRASH YOUR COMPUTER
  • 21. DO NOT USE A TECHNOLOGY BECAUSE YOU <3 IT OR BECAUSE IT’S HYPE : USE IT BECAUSE IT FITS YOUR NEEDS BALANCE YOUR LEARNING CURVE WITH THE TIME SAVED
  • 22. DO NOT CREATE MONSTERS
  • 24. DO NOT USE MEMORY AS DATABASE LIKE : SHARED / GLOBAL VARIABLE, CACHE “IN THE CODE”, INTENSIVE SESSION USAGE…
  • 25.
  • 26. DO NOT USE A VARIABLE FOR MORE THAN ONE REQUEST
  • 27. 2 + 2 = 4 FOR SAME INPUT, SAME OUTPUT
  • 28. GET do not change data on server BE HTTP CONSISTENT
  • 29. And data will be lost CODE WILL FAIL
  • 30. DO NOT USE FILE SYSTEM AS DATASTORE File system are POSIX compliant • POSIX is ACID • POSIX is powerful but is bottleneck • File System is nightmare of ops • File System is create coupling (host provider/OS/language) • Free SPOF multi tenant File System is a unicorn STORE IN DATABASE, OR DATASTORE LIKE S3 (AWS) DEDICATED TO FILE MANAGEMENT
  • 32. SPLIT THE CODE : MODULES • Smallest code base • Deploy as service for each other • Focus on best technology for a problem
  • 34. USE EVENT BROKER TO MODULARIZE YOUR APP • AMQP • Celery • 0MQ • Redis • JMS • Some case : hadoop, akka… • … CRON is not an event queue
  • 36. ALWAYS USE A REVERSE PROXY Y U NOT USE ONE ?
  • 37. DO NOT BUILD “THE SERVER” WITH NO DOC
  • 41. TRACK BUG & GET METRICS
  • 42. Quentin ADAM Twitter : @waxzce THX FOR LISTENING & QUESTIONS TIME