SlideShare a Scribd company logo
HOW TO
SCALE YOUR
APP SOME ADVICE FROM
THE GUY WHO HANDLES
YOUR APP UPTIME
QUENTIN ADAM AT SCALA.IO
@WAXZCE

2013
MY DAY TO DAY WORK :
CLEVER CLOUD, MAKE YOUR APP RUN
ALL THE TIME
THERE ARE 2 WAYS

WHEN YOU
NEED TO
SCALE
GROWING AND GROWING
UNTIL YOU EXPLODE OR
BECOME WEIRD
OR SPLIT THE WORK AND
MAKE YOUR SOFTWARE
WORK AS A TEAM
YOU CAN DO BOTH
Build an army of fat app
SO WE NEED TO BE ABLE
TO DISPATCH THE WORK
SCALE OUT

SCALE UP

• Many workers
doing the same
thing

• 1 Fat instance

• 1 Fat application

• No SPOF

• SPOF (single point
of failure)

• Growing is more
easy

• Hard to maintain

• Introduce best
practice

• 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
STATELESSNESS IS THE KEY
Picking one instance or another doesn’t matter
CONSIDER MORE
THINGS AS DATA
• User account

• Users data
• Files
• Sessions
• Events
TRUST YOUR
MIDDLEWARE
USE AN EVENT BROKER
TO MODULARIZE YOUR
APP
• AMQP

• Celery
• 0MQ
• Redis
• JMS
• Even some http chunk or websocket
• Some case : hadoop, akka…
• …
CRON + FS IS NEITHER AN EVENT
QUEUE NOR A JOB SCHEDULER
CHOOSE
YOUR
DATASTORE
WISELY
YOU CAN SHOULD USE MANY DATASTORES
DATASTORE CHOICES
ARE DRIVEN BY USAGE
Do I mostly
read or
write ?

Do I need
relational ?

Do I need
concurrent
access ?

Do I need
atomicity of
requests ?

Do I need
big storage
capacity ?

Make
decisions
based on
needs

Do I need
high
availability ?
USE ONLINE
DATABASE / BE
READY TO TEST
IN JUST A FEW
MINUTES
NO NEED TO TRASH YOUR COMPUTER
COMMON MISTAKES
DO NOT USE THE FILE
SYSTEM AS A DATASTORE
File system are POSIX compliant

•
•
•
•
•

POSIX is ACID
POSIX is powerful but is a bottleneck
File System is the nightmare of ops
File System creates coupling (host provider/OS/language)
SPOF-free multi tenant File System is a unicorn

STORE IN DATABASE, OR IN A DATASTORE LIKE
S3/RIAKCS DEDICATED TO FILE MANAGEMENT
LOGS IN FILES
I HATE IT
USE STREAMING I/O TO
STREAM DATA DIRECTLY
TO DATABASE

HTTP Post data

Temporarily
store as file
or in memory

Store it into
your storage
backend

Say OK to
client
USE STREAMING I/O TO
STREAM DATA DIRECTLY
TO DATABASE

HTTP Post data

Directly stream
your data to
Storage
backend

Say OK to
client
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
F(X) = X * 2
F(2) = 4

^ WE ASSUME THAT
FOR SAME INPUT, SAME OUTPUT
IT’S LIKE MATH FUNCTION
You have to understand that : you’re functional programing addicts ;-)
RESPECT HTTP
Example : GET should not change data on server
CODE
WILL
FAIL
data will be lost
CAREFUL USE OF
DARK MAGIC
DO NOT CREATE MONSTERS
MAKE HARD
COMPUTATION ASYNC
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
ALWAYS USE A
REVERSE PROXY

Y U NO USE ONE ?
DO NOT BUILD “THE
SERVER” WITH NO DOC
USE PROCESS
DEPLOYMENT
THE GOOD WAY OF
DEPLOY AN APP :

git push
EASY MOVING OR
INCIDENT MANAGEMENT
KEEP CALM UNDER FIRE
TRACK BUG & GET METRICS
THX FOR LISTENING
& QUESTIONS TIME
I’m @waxzce on twitter

I’m the CEO of

sponsors
a non exclusive scala PaaS
provider, give it a try ;-)

More Related Content

PDF
WordPress 4.4 and Upgrading Your Site (without the tears...)
PDF
A Flask Of Marshmallows
PPTX
PHP deploy 2015 flavor - talk from php tour 2015 luxembourg
PPTX
Why do you need Clever Cloud ?
PPTX
Dead-Simple Deployment: Headache-Free Java Web Applications in the Cloud
PPS
Web20expo Filesystems
PDF
JUST EAT: Embracing DevOps
PDF
Intro to word press
WordPress 4.4 and Upgrading Your Site (without the tears...)
A Flask Of Marshmallows
PHP deploy 2015 flavor - talk from php tour 2015 luxembourg
Why do you need Clever Cloud ?
Dead-Simple Deployment: Headache-Free Java Web Applications in the Cloud
Web20expo Filesystems
JUST EAT: Embracing DevOps
Intro to word press

What's hot (18)

PPTX
Optimizing AWS Economics
PPTX
AWS Meet-up Atlanta: AWS Economics
PPTX
Rapid RESTful Web Applications with Apache Sling and Jackrabbit
PDF
Word press and containers
PPTX
Amazon Workspaces Master Class
PPT
Installation xampp and WordPress on localhost
PPTX
AWS Meet-up San Francisco: Cloud Security
PPS
Web20expo Scalable Web Arch
PDF
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
PPS
Flickr Services
PPTX
Aws meetup managed_nat
PDF
How to set up world-class web hosting
 
PPT
Install Word Press with xampp
PPTX
Understand AWS OpsWorks - A DevOps Tool from AWS
PDF
Let's Code our Infrastructure!
PPTX
Using RStudio on AWS
PDF
Optimizing CakePHP 2.x Apps
PPTX
Optimizing AWS Economics
AWS Meet-up Atlanta: AWS Economics
Rapid RESTful Web Applications with Apache Sling and Jackrabbit
Word press and containers
Amazon Workspaces Master Class
Installation xampp and WordPress on localhost
AWS Meet-up San Francisco: Cloud Security
Web20expo Scalable Web Arch
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Flickr Services
Aws meetup managed_nat
How to set up world-class web hosting
 
Install Word Press with xampp
Understand AWS OpsWorks - A DevOps Tool from AWS
Let's Code our Infrastructure!
Using RStudio on AWS
Optimizing CakePHP 2.x Apps
Ad

Similar to Some advice from the guy who handle your applications uptime - scalaIO 2013 (20)

PPTX
How to scale your applications ? - #bzhcamp
PPTX
How to scale your app and win the cloud challenge
PPTX
From delivering plugins to delivering "as a Service" - Atlassian connect 2017
PDF
Dotscale2013 : How to scale ?
PPTX
Immutability: from code to infrastructure, the way of scalability - snowcamp ...
PPTX
The end of server management : hosting have to become a commodity - #devoxxPL...
PPTX
Immutability: from code to infrastructure, the way to scalability - Breizhca...
PPTX
Immutability: from code to infrastructure, the way to scalability - Voxxed Da...
PDF
Mike Krieger - A Brief, Rapid History of Scaling Instagram (with a tiny team)
PPT
UnConference for Georgia Southern Computer Science March 31, 2015
PPTX
Be a modern developer ! #liveCoding #cloud #docker #akka #scala #amqp - at Ch...
PPTX
JavaOne 2016 "Java, Microservices, Cloud and Containers"
PDF
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
PDF
Scaling Instagram
PDF
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
PDF
Evolving to Cloud-Native - Nate Schutta 2/2
PPTX
Stacktrace Berlin RC.2
PPT
Resilience: the key requirement of a [big] [data] architecture - StampedeCon...
PDF
Architecting for the cloud
PPT
The economies of scaling software - Abdel Remani
How to scale your applications ? - #bzhcamp
How to scale your app and win the cloud challenge
From delivering plugins to delivering "as a Service" - Atlassian connect 2017
Dotscale2013 : How to scale ?
Immutability: from code to infrastructure, the way of scalability - snowcamp ...
The end of server management : hosting have to become a commodity - #devoxxPL...
Immutability: from code to infrastructure, the way to scalability - Breizhca...
Immutability: from code to infrastructure, the way to scalability - Voxxed Da...
Mike Krieger - A Brief, Rapid History of Scaling Instagram (with a tiny team)
UnConference for Georgia Southern Computer Science March 31, 2015
Be a modern developer ! #liveCoding #cloud #docker #akka #scala #amqp - at Ch...
JavaOne 2016 "Java, Microservices, Cloud and Containers"
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
Scaling Instagram
89025069 mike-krieger-instagram-at-the-airbnb-tech-talk-on-scaling-instagram
Evolving to Cloud-Native - Nate Schutta 2/2
Stacktrace Berlin RC.2
Resilience: the key requirement of a [big] [data] architecture - StampedeCon...
Architecting for the cloud
The economies of scaling software - Abdel Remani
Ad

More from Quentin Adam (20)

PPTX
Beyond Interoperability : Versatility as the future of Cloud services
PPTX
Lunaconf DIgital Market in Europe talk for Tech
PPTX
Opening Keynote : Domestic Digital market - Jug summercamp 2024
PPTX
Biscuit, the cryptotoken you can share safely with your ap is
PPTX
Keynot Cloud Expo Intel
PPTX
Pulsar 101 at devoxx
PPTX
Traversing hyper driven developpement to do great technical choices and make ...
PPTX
How to make people work together? - ending keynote - devfest du bout du monde...
PPTX
Remove centralization on Authorization - API Days Paris 2018 (announcement fo...
PPTX
PostgreSQL is the new NoSQL - at Devoxx 2018
PPTX
Hype driven architecture - keynote at devfest Toulouse 2018
PPTX
Real world code, why are you so ashamed? - RivieraDev 2018
PPTX
Monitorer l'inconnu, 1000 * 100 series par jour - talk avec @clementd à #devo...
PPTX
Comment les contrôleurs de gestion ont fuck up mon IT - Lean Kanban France 2017
PPTX
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
PPTX
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
PPTX
MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017
PPTX
Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...
PDF
What is Clever Cloud?
PPTX
Why all my software projects are late?
Beyond Interoperability : Versatility as the future of Cloud services
Lunaconf DIgital Market in Europe talk for Tech
Opening Keynote : Domestic Digital market - Jug summercamp 2024
Biscuit, the cryptotoken you can share safely with your ap is
Keynot Cloud Expo Intel
Pulsar 101 at devoxx
Traversing hyper driven developpement to do great technical choices and make ...
How to make people work together? - ending keynote - devfest du bout du monde...
Remove centralization on Authorization - API Days Paris 2018 (announcement fo...
PostgreSQL is the new NoSQL - at Devoxx 2018
Hype driven architecture - keynote at devfest Toulouse 2018
Real world code, why are you so ashamed? - RivieraDev 2018
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
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017
Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...
What is Clever Cloud?
Why all my software projects are late?

Recently uploaded (20)

PPT
What is a Computer? Input Devices /output devices
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Five Habits of High-Impact Board Members
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
August Patch Tuesday
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Architecture types and enterprise applications.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Unlock new opportunities with location data.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
Modernising the Digital Integration Hub
What is a Computer? Input Devices /output devices
NewMind AI Weekly Chronicles – August ’25 Week III
Module 1.ppt Iot fundamentals and Architecture
Five Habits of High-Impact Board Members
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
sustainability-14-14877-v2.pddhzftheheeeee
Zenith AI: Advanced Artificial Intelligence
Final SEM Unit 1 for mit wpu at pune .pptx
August Patch Tuesday
Enhancing emotion recognition model for a student engagement use case through...
Hindi spoken digit analysis for native and non-native speakers
Architecture types and enterprise applications.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions
Group 1 Presentation -Planning and Decision Making .pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Unlock new opportunities with location data.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Modernising the Digital Integration Hub

Some advice from the guy who handle your applications uptime - scalaIO 2013