SlideShare a Scribd company logo
1 of 45
Download to read offline
DAVID WORTHDATE PRESENTER:
06.16.15
TITLES ARE HARD
EVEN WHEN YOU SCALE WEB APPLICATIONS WELL
Intros - All Around
David Worth (dworth@digitalocean.com)

Friendly Engineer at DigitalOcean (seriously, seem
my business cards)

Who are you nice folks?
What is DigitalOcean?
We provide "Droplets" e.g. Virtual Private Servers,
Backups, Private Networking, IPv6, DNS, and
amazing tutorials and support. 

We also provide a high-quality RESTful API which
provides access to everything you see in the web
UI "cloud".
DigitalOcean is a ā€œCloud Providerā€ e.g.
Andā€¦ Weā€™re Hiring
Come work with me! - Careers at DigitalOcean
DROPLETS COME IN NUMEROUS SIZES
ā€œSIZEā€ DICTATES CPU, RAM, DISK SIZE, AND BANDWIDTH
WITH ALL THE DISTRIBUTIONS (AND FREEBSD!!)
AND IN FAR-FLUNG AWESOME REGIONS OF THE WORLD
TUNE FOR YOUR TARGET AUDIENCE!
AND OUR ā€œONE-CLICKā€ APPLICATIONS
AT LEAST ONE OF WHICH MIGHT BE OF INTEREST!
INTERMISSION
WHEREIN DROPLETS WERE CREATED AND VERY LITTLE
DEMO-FAIL WAS COMMITTED!!
SCALING
WHY AND HOW?
THE VIRAL SELFIE
A CONTRIVED EXAMPLE OF
NEED.
When ļ¬rst starting a new blog, site, application, or
toy it probably makes sense to use the smallest
server you can get away with for money reasons.
ā€¦ But then you take a great selļ¬e and ā€¦
SO YOUā€™VE DECIDED TO BECOME INTERNET FAMOUS
ā€¦ and now your site canā€™t handle the load!
NOW I NEED TO DO
SOMETHING!
ā€¦ HAVE YOU TRIED
SCALING?
The two types of scaling:
Vertical - using bigger and bigger servers to meet
your needs.

Horizontal - using more and more (potentially
smaller) servers to meet your needs.
Two types of Vertical
Scaling at DigitalOcean
Flexible - increase CPU and memory temporarily -
this can always be un-done and can meet a
temporary need.

Permanent - increase all of the attributes of your
Droplet (CPU, RAM, disk, and bandwidth) - cannot
be undone.

Both are performed by ā€œresizingā€ your Droplet.
Sounds Great! What do I
need to know?
Resizing requires your Droplet to be powered
down, then resized, and then powered back up.

e.g You will have an outage in case of a resize!

e.g. Your internet famousness will falter! (NO!!!)
So when would I want to
resize?
Before you launch!

Doing your development of a new site on the
smallest possible instance is cost-eļ¬€ective and
makes sense. But before you post your site to /r/
cuteness resize!
Vertical Scaling!
* Yes - bigger pixels are faster/better/MOAR in this diagram
BUT TALL THINGS
SOMETIMES TOPPLEā€¦
Why Horizontal Scaling?
Because sometimes bad things happen to good
droplets - Servers Crash. Software bugs bring
down a server. The internet just breaks. We try to
stop it butā€¦

More importantly - Composing a few smaller
servers can be used, and more can be added
without downtime!
WHERE WE START!
ā€¦ Remember how we got internet famous?
ā€¦ But we canā€™t aļ¬€ord downtime with a resizeā€¦
ā€¦ Perhaps a new strategy? Like MOAR servers?
THE FIRST ā€œEASYā€ STEP
LOAD-BALANCING OUR WEB SERVERS
The short-versionā€¦
Several ā€œsmallerā€ webservers - all sharing a single
database server - are ā€œbalancedā€ by a reverse-
proxy server such as Nginx or HAProxy.

Greater cost and technical overhead but greater
resiliency under failure of a single web-serving
droplet.

You can add more webservers anytime you like!
As many as you like really. And of any size!
Ohā€¦ but what about that lone Database server!

What happens if it crashes? Or is overwhelmed
by a complicated query?
Maybe we can scale it horizontally too?
THE NEXT-STEP
REPLICATING OUR DATABASE SERVERS FOR GREATER RESILIENCY - HYPERDB
Database Replication
The data on most applications and sites is write-once /
read-many soā€¦

We can create replicas of the database holding all of
your precious content and have it arrive on other
database servers automagically.

Each webserver can then query its own copy of the
data.

In the WordPress world this can be achieved with
HyperDB.
ā€¦ but what about static assets (like my selļ¬es?!)
THEREā€™S A
NETWORKED
FILESYSTEM FOR
THAT!
ADDING A CDN OR NETWORKED FILESYSTEM TO REPLICATE ASSETS
ā€¦ that ā€œorā€
If you have constraints on your assets that you
control them at all times use a Network Filesystem
like Ceph or GlusterFS.

If you donā€™t have that constraint CDNs provide
many advantages including lower infrastructure
complexity, lower-latency, and a specialized
services whose only job is to server your assets.
TIPS AND TRICKS TO MAKE
YOUR LIFE EASIER
Use some Conļ¬guration
Management
When bringing up new servers, it really helps to
not have to spend any manual energy doing so -
Use DigitalOceanā€™s User-Data, Ansible, Puppet,
SaltStack, or Chef.

This ensures your life is easier at 4am after three
consecutive all-nighters when you need more
capacity.
You can use vertical scaling
with horizontal scaling
Once you can add and remove servers to your
conļ¬guration, you can add various sizes too!

To scale up your entire architecture spin up a new,
larger server, and spin down a smaller one. Your
Load Balancer will add and remove them as
appropriate. Do this until all of your servers are
upgraded!
SUCCESS!!
SCALE!!
Questions?
References:
How to Automate the Scaling of your web
application on DigitalOcean

Automating the Deployment of a Scalable
WordPress Site

How to Optimize WordPress Performance with
MySQL Replication on Ubuntu 14.04

Automating App Deployments using User-Data

More Related Content

What's hot

Servers? We don't need no stinking servers
Servers? We don't need no stinking serversServers? We don't need no stinking servers
Servers? We don't need no stinking serversWekoslav Stefanovski
Ā 
Cloud, and The Death of The Sysadmin
Cloud, and The Death of The SysadminCloud, and The Death of The Sysadmin
Cloud, and The Death of The SysadminAndika Kurniantoro
Ā 
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...Quentin Adam
Ā 
Know Before You Go - AWS Online Tech Talks
Know Before You Go - AWS Online Tech TalksKnow Before You Go - AWS Online Tech Talks
Know Before You Go - AWS Online Tech TalksAmazon Web Services
Ā 
The cloud and all that jazz
The cloud and all that jazzThe cloud and all that jazz
The cloud and all that jazzNick Hadlee
Ā 
How to scale your app and win the cloud challenge
How to scale your app and win the cloud challenge How to scale your app and win the cloud challenge
How to scale your app and win the cloud challenge Quentin Adam
Ā 
Denver AWS Users' Group Meeting - July 2018 Slides
Denver AWS Users' Group Meeting - July 2018 SlidesDenver AWS Users' Group Meeting - July 2018 Slides
Denver AWS Users' Group Meeting - July 2018 SlidesDavid McDaniel
Ā 
Cloud Computing Impact
Cloud Computing ImpactCloud Computing Impact
Cloud Computing ImpactVirttoo org
Ā 
Ecommerce and digital workshop / Unlocked: the Hybrid Cloud 12 May 2014
Ecommerce and digital workshop / Unlocked: the Hybrid Cloud 12 May 2014Ecommerce and digital workshop / Unlocked: the Hybrid Cloud 12 May 2014
Ecommerce and digital workshop / Unlocked: the Hybrid Cloud 12 May 2014Rackspace Academy
Ā 
Get your head in the clouds! - Swansea Con 2016
Get your head in the clouds! - Swansea Con 2016Get your head in the clouds! - Swansea Con 2016
Get your head in the clouds! - Swansea Con 2016Christopher Cundill
Ā 
Cloud Data Management at Australia's Largest Software Company -Session Sponso...
Cloud Data Management at Australia's Largest Software Company -Session Sponso...Cloud Data Management at Australia's Largest Software Company -Session Sponso...
Cloud Data Management at Australia's Largest Software Company -Session Sponso...Amazon Web Services
Ā 
Serverless Architectures: Ein Survival Guide
Serverless Architectures: Ein Survival GuideServerless Architectures: Ein Survival Guide
Serverless Architectures: Ein Survival GuideOPEN KNOWLEDGE GmbH
Ā 
How to Grow a Serverless Team
How to Grow a Serverless TeamHow to Grow a Serverless Team
How to Grow a Serverless TeamSheenBrisals
Ā 
Phteknow cloud
Phteknow cloudPhteknow cloud
Phteknow cloudParesh Shah
Ā 
Building a modern web application in the cloud partnercon
Building a modern web application in the cloud partnerconBuilding a modern web application in the cloud partnercon
Building a modern web application in the cloud partnerconJesus Manuel Olivas
Ā 
DevTools at Netflix: Culture, Speed & Innovation
DevTools at Netflix: Culture, Speed & InnovationDevTools at Netflix: Culture, Speed & Innovation
DevTools at Netflix: Culture, Speed & InnovationAtlassian
Ā 
Enterprise Serverless Adoption. An Experience Report
Enterprise Serverless Adoption. An Experience ReportEnterprise Serverless Adoption. An Experience Report
Enterprise Serverless Adoption. An Experience ReportSheenBrisals
Ā 
Hot tech 20161102 - ep0018 - idera - application acceleration - faster perfor...
Hot tech 20161102 - ep0018 - idera - application acceleration - faster perfor...Hot tech 20161102 - ep0018 - idera - application acceleration - faster perfor...
Hot tech 20161102 - ep0018 - idera - application acceleration - faster perfor...Dez Blanchfield
Ā 

What's hot (20)

Servers? We don't need no stinking servers
Servers? We don't need no stinking serversServers? We don't need no stinking servers
Servers? We don't need no stinking servers
Ā 
Cloud, and The Death of The Sysadmin
Cloud, and The Death of The SysadminCloud, and The Death of The Sysadmin
Cloud, and The Death of The Sysadmin
Ā 
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...
Ā 
Know Before You Go - AWS Online Tech Talks
Know Before You Go - AWS Online Tech TalksKnow Before You Go - AWS Online Tech Talks
Know Before You Go - AWS Online Tech Talks
Ā 
The cloud and all that jazz
The cloud and all that jazzThe cloud and all that jazz
The cloud and all that jazz
Ā 
How to scale your app and win the cloud challenge
How to scale your app and win the cloud challenge How to scale your app and win the cloud challenge
How to scale your app and win the cloud challenge
Ā 
Denver AWS Users' Group Meeting - July 2018 Slides
Denver AWS Users' Group Meeting - July 2018 SlidesDenver AWS Users' Group Meeting - July 2018 Slides
Denver AWS Users' Group Meeting - July 2018 Slides
Ā 
Cloud Computing Impact
Cloud Computing ImpactCloud Computing Impact
Cloud Computing Impact
Ā 
Ecommerce and digital workshop / Unlocked: the Hybrid Cloud 12 May 2014
Ecommerce and digital workshop / Unlocked: the Hybrid Cloud 12 May 2014Ecommerce and digital workshop / Unlocked: the Hybrid Cloud 12 May 2014
Ecommerce and digital workshop / Unlocked: the Hybrid Cloud 12 May 2014
Ā 
Forecast 2014: Hackathon
Forecast 2014: HackathonForecast 2014: Hackathon
Forecast 2014: Hackathon
Ā 
Get your head in the clouds! - Swansea Con 2016
Get your head in the clouds! - Swansea Con 2016Get your head in the clouds! - Swansea Con 2016
Get your head in the clouds! - Swansea Con 2016
Ā 
Eurocloud
EurocloudEurocloud
Eurocloud
Ā 
Cloud Data Management at Australia's Largest Software Company -Session Sponso...
Cloud Data Management at Australia's Largest Software Company -Session Sponso...Cloud Data Management at Australia's Largest Software Company -Session Sponso...
Cloud Data Management at Australia's Largest Software Company -Session Sponso...
Ā 
Serverless Architectures: Ein Survival Guide
Serverless Architectures: Ein Survival GuideServerless Architectures: Ein Survival Guide
Serverless Architectures: Ein Survival Guide
Ā 
How to Grow a Serverless Team
How to Grow a Serverless TeamHow to Grow a Serverless Team
How to Grow a Serverless Team
Ā 
Phteknow cloud
Phteknow cloudPhteknow cloud
Phteknow cloud
Ā 
Building a modern web application in the cloud partnercon
Building a modern web application in the cloud partnerconBuilding a modern web application in the cloud partnercon
Building a modern web application in the cloud partnercon
Ā 
DevTools at Netflix: Culture, Speed & Innovation
DevTools at Netflix: Culture, Speed & InnovationDevTools at Netflix: Culture, Speed & Innovation
DevTools at Netflix: Culture, Speed & Innovation
Ā 
Enterprise Serverless Adoption. An Experience Report
Enterprise Serverless Adoption. An Experience ReportEnterprise Serverless Adoption. An Experience Report
Enterprise Serverless Adoption. An Experience Report
Ā 
Hot tech 20161102 - ep0018 - idera - application acceleration - faster perfor...
Hot tech 20161102 - ep0018 - idera - application acceleration - faster perfor...Hot tech 20161102 - ep0018 - idera - application acceleration - faster perfor...
Hot tech 20161102 - ep0018 - idera - application acceleration - faster perfor...
Ā 

Viewers also liked

Market Research Report : Online and Offline Classifieds Market in India 2011
Market Research Report : Online and Offline Classifieds Market in India 2011Market Research Report : Online and Offline Classifieds Market in India 2011
Market Research Report : Online and Offline Classifieds Market in India 2011Netscribes, Inc.
Ā 
India classified market report 2020 |India Online B2B Classifieds Market
India classified market report  2020 |India Online B2B Classifieds MarketIndia classified market report  2020 |India Online B2B Classifieds Market
India classified market report 2020 |India Online B2B Classifieds MarketKen Research Pvt ltd.
Ā 
Market Research Report : Online advertising in India 2012
Market Research Report : Online advertising in India 2012Market Research Report : Online advertising in India 2012
Market Research Report : Online advertising in India 2012Netscribes, Inc.
Ā 
Market entry strategy ooh
Market entry strategy oohMarket entry strategy ooh
Market entry strategy oohPratik Chitalia
Ā 
Market Research Report : Online and offline classifieds market in india 2012
Market Research Report : Online and offline classifieds market in india 2012Market Research Report : Online and offline classifieds market in india 2012
Market Research Report : Online and offline classifieds market in india 2012Netscribes, Inc.
Ā 
Five of the best PR campaigns from 2016 | Behind the headlines: getting your ...
Five of the best PR campaigns from 2016 | Behind the headlines: getting your ...Five of the best PR campaigns from 2016 | Behind the headlines: getting your ...
Five of the best PR campaigns from 2016 | Behind the headlines: getting your ...CharityComms
Ā 
Types of advertisement
Types of advertisement Types of advertisement
Types of advertisement Cochin University
Ā 
Advertising and sales promotion ppt
Advertising and sales promotion pptAdvertising and sales promotion ppt
Advertising and sales promotion pptpahalnopani
Ā 
What I learned leading Ops at GitHub, Heroku, DigitalOcean, and more...
What I learned leading Ops at GitHub, Heroku, DigitalOcean, and more...What I learned leading Ops at GitHub, Heroku, DigitalOcean, and more...
What I learned leading Ops at GitHub, Heroku, DigitalOcean, and more...Mark Imbriaco
Ā 

Viewers also liked (11)

Market Research Report : Online and Offline Classifieds Market in India 2011
Market Research Report : Online and Offline Classifieds Market in India 2011Market Research Report : Online and Offline Classifieds Market in India 2011
Market Research Report : Online and Offline Classifieds Market in India 2011
Ā 
India classified market report 2020 |India Online B2B Classifieds Market
India classified market report  2020 |India Online B2B Classifieds MarketIndia classified market report  2020 |India Online B2B Classifieds Market
India classified market report 2020 |India Online B2B Classifieds Market
Ā 
Market Research Report : Online advertising in India 2012
Market Research Report : Online advertising in India 2012Market Research Report : Online advertising in India 2012
Market Research Report : Online advertising in India 2012
Ā 
Market entry strategy ooh
Market entry strategy oohMarket entry strategy ooh
Market entry strategy ooh
Ā 
Fundamental of Advertising
Fundamental of AdvertisingFundamental of Advertising
Fundamental of Advertising
Ā 
Market Research Report : Online and offline classifieds market in india 2012
Market Research Report : Online and offline classifieds market in india 2012Market Research Report : Online and offline classifieds market in india 2012
Market Research Report : Online and offline classifieds market in india 2012
Ā 
Five of the best PR campaigns from 2016 | Behind the headlines: getting your ...
Five of the best PR campaigns from 2016 | Behind the headlines: getting your ...Five of the best PR campaigns from 2016 | Behind the headlines: getting your ...
Five of the best PR campaigns from 2016 | Behind the headlines: getting your ...
Ā 
Types of advertisement
Types of advertisement Types of advertisement
Types of advertisement
Ā 
Types of Advertisement
Types of AdvertisementTypes of Advertisement
Types of Advertisement
Ā 
Advertising and sales promotion ppt
Advertising and sales promotion pptAdvertising and sales promotion ppt
Advertising and sales promotion ppt
Ā 
What I learned leading Ops at GitHub, Heroku, DigitalOcean, and more...
What I learned leading Ops at GitHub, Heroku, DigitalOcean, and more...What I learned leading Ops at GitHub, Heroku, DigitalOcean, and more...
What I learned leading Ops at GitHub, Heroku, DigitalOcean, and more...
Ā 

Similar to Scaling on DigitalOcean

Web Hosting - Web Hosting Curriculum [1/10]
Web Hosting - Web Hosting Curriculum [1/10]Web Hosting - Web Hosting Curriculum [1/10]
Web Hosting - Web Hosting Curriculum [1/10]Web Hosting for Students
Ā 
The Evolution of Hosting and What's Next in Cloud Architecture - EE Conf 2018
The Evolution of Hosting and What's Next in Cloud Architecture - EE Conf 2018 The Evolution of Hosting and What's Next in Cloud Architecture - EE Conf 2018
The Evolution of Hosting and What's Next in Cloud Architecture - EE Conf 2018 Josh Ward
Ā 
The Next Big Thing: Serverless
The Next Big Thing: ServerlessThe Next Big Thing: Serverless
The Next Big Thing: ServerlessDoug Vanderweide
Ā 
Virtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandVirtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandYan Pritzker
Ā 
Scaling Your Web Application
Scaling Your Web ApplicationScaling Your Web Application
Scaling Your Web ApplicationKetan Deshmukh
Ā 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)Randy Connolly
Ā 
Introduction to cloud computing - za garage talks
Introduction to cloud computing -  za garage talksIntroduction to cloud computing -  za garage talks
Introduction to cloud computing - za garage talksVijay Rayapati
Ā 
APIdays Paris 2018 - Cloud computing - we went through every steps of the Gar...
APIdays Paris 2018 - Cloud computing - we went through every steps of the Gar...APIdays Paris 2018 - Cloud computing - we went through every steps of the Gar...
APIdays Paris 2018 - Cloud computing - we went through every steps of the Gar...apidays
Ā 
Scalable Web Arch
Scalable Web ArchScalable Web Arch
Scalable Web Archroyans
Ā 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesCal Henderson
Ā 
Dictionary Within the Cloud
Dictionary Within the CloudDictionary Within the Cloud
Dictionary Within the Cloudgueste4978b94
Ā 
agile microservices @scaibo
agile microservices @scaiboagile microservices @scaibo
agile microservices @scaiboCiro Donato Caiazzo
Ā 
Docker - Scripting the PayPal Cloud
Docker - Scripting the PayPal CloudDocker - Scripting the PayPal Cloud
Docker - Scripting the PayPal CloudAbraham Hoffman
Ā 
Vdi, rds, med v, app-v - right decisions
Vdi, rds, med v, app-v - right decisionsVdi, rds, med v, app-v - right decisions
Vdi, rds, med v, app-v - right decisionsConcentrated Technology
Ā 
Virtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud ComptingVirtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud ComptingAhmed Mekkawy
Ā 
Converged Infrastructure
Converged InfrastructureConverged Infrastructure
Converged InfrastructureInnoTech
Ā 

Similar to Scaling on DigitalOcean (20)

Web Hosting - Web Hosting Curriculum [1/10]
Web Hosting - Web Hosting Curriculum [1/10]Web Hosting - Web Hosting Curriculum [1/10]
Web Hosting - Web Hosting Curriculum [1/10]
Ā 
The Evolution of Hosting and What's Next in Cloud Architecture - EE Conf 2018
The Evolution of Hosting and What's Next in Cloud Architecture - EE Conf 2018 The Evolution of Hosting and What's Next in Cloud Architecture - EE Conf 2018
The Evolution of Hosting and What's Next in Cloud Architecture - EE Conf 2018
Ā 
Ansible Case Studies
Ansible Case StudiesAnsible Case Studies
Ansible Case Studies
Ā 
The Next Big Thing: Serverless
The Next Big Thing: ServerlessThe Next Big Thing: Serverless
The Next Big Thing: Serverless
Ā 
Virtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandVirtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On Demand
Ā 
Scaling Your Web Application
Scaling Your Web ApplicationScaling Your Web Application
Scaling Your Web Application
Ā 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)
Ā 
Introduction to cloud computing - za garage talks
Introduction to cloud computing -  za garage talksIntroduction to cloud computing -  za garage talks
Introduction to cloud computing - za garage talks
Ā 
APIdays Paris 2018 - Cloud computing - we went through every steps of the Gar...
APIdays Paris 2018 - Cloud computing - we went through every steps of the Gar...APIdays Paris 2018 - Cloud computing - we went through every steps of the Gar...
APIdays Paris 2018 - Cloud computing - we went through every steps of the Gar...
Ā 
Scalable Web Arch
Scalable Web ArchScalable Web Arch
Scalable Web Arch
Ā 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
Ā 
Dictionary Within the Cloud
Dictionary Within the CloudDictionary Within the Cloud
Dictionary Within the Cloud
Ā 
Web Werks Cloud Hosting FAQ
Web Werks Cloud Hosting FAQWeb Werks Cloud Hosting FAQ
Web Werks Cloud Hosting FAQ
Ā 
agile microservices @scaibo
agile microservices @scaiboagile microservices @scaibo
agile microservices @scaibo
Ā 
Docker - Scripting the PayPal Cloud
Docker - Scripting the PayPal CloudDocker - Scripting the PayPal Cloud
Docker - Scripting the PayPal Cloud
Ā 
Vdi, rds, med v, app-v - right decisions
Vdi, rds, med v, app-v - right decisionsVdi, rds, med v, app-v - right decisions
Vdi, rds, med v, app-v - right decisions
Ā 
Virtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud ComptingVirtualization Techniques & Cloud Compting
Virtualization Techniques & Cloud Compting
Ā 
JOSA TechTalks - Downgrade your Costs
JOSA TechTalks - Downgrade your CostsJOSA TechTalks - Downgrade your Costs
JOSA TechTalks - Downgrade your Costs
Ā 
Converged Infrastructure
Converged InfrastructureConverged Infrastructure
Converged Infrastructure
Ā 
Jumpstart Azure
Jumpstart AzureJumpstart Azure
Jumpstart Azure
Ā 

Recently uploaded

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
Ā 
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 RobisonAnna Loughnan Colquhoun
Ā 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
Ā 
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
Ā 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜RTylerCroy
Ā 
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 2024The Digital Insurer
Ā 
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
Ā 
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 Processorsdebabhi2
Ā 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
Ā 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
Ā 
[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 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
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
Ā 
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...Neo4j
Ā 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
Ā 
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
Ā 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
Ā 
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 WorkerThousandEyes
Ā 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Ā 
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
Ā 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Ā 
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...
Ā 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
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
Ā 
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
Ā 
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
Ā 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Ā 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Ā 
[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 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
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Ā 
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...
Ā 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Ā 
Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024
Ā 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
Ā 
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
Ā 

Scaling on DigitalOcean

  • 1. DAVID WORTHDATE PRESENTER: 06.16.15 TITLES ARE HARD EVEN WHEN YOU SCALE WEB APPLICATIONS WELL
  • 2. Intros - All Around David Worth (dworth@digitalocean.com) Friendly Engineer at DigitalOcean (seriously, seem my business cards) Who are you nice folks?
  • 3. What is DigitalOcean? We provide "Droplets" e.g. Virtual Private Servers, Backups, Private Networking, IPv6, DNS, and amazing tutorials and support. We also provide a high-quality RESTful API which provides access to everything you see in the web UI "cloud". DigitalOcean is a ā€œCloud Providerā€ e.g.
  • 4. Andā€¦ Weā€™re Hiring Come work with me! - Careers at DigitalOcean
  • 5. DROPLETS COME IN NUMEROUS SIZES ā€œSIZEā€ DICTATES CPU, RAM, DISK SIZE, AND BANDWIDTH
  • 6. WITH ALL THE DISTRIBUTIONS (AND FREEBSD!!)
  • 7. AND IN FAR-FLUNG AWESOME REGIONS OF THE WORLD TUNE FOR YOUR TARGET AUDIENCE!
  • 9. AT LEAST ONE OF WHICH MIGHT BE OF INTEREST!
  • 10. INTERMISSION WHEREIN DROPLETS WERE CREATED AND VERY LITTLE DEMO-FAIL WAS COMMITTED!!
  • 12. THE VIRAL SELFIE A CONTRIVED EXAMPLE OF NEED.
  • 13. When ļ¬rst starting a new blog, site, application, or toy it probably makes sense to use the smallest server you can get away with for money reasons.
  • 14. ā€¦ But then you take a great selļ¬e and ā€¦
  • 15. SO YOUā€™VE DECIDED TO BECOME INTERNET FAMOUS
  • 16. ā€¦ and now your site canā€™t handle the load!
  • 17. NOW I NEED TO DO SOMETHING! ā€¦ HAVE YOU TRIED SCALING?
  • 18. The two types of scaling: Vertical - using bigger and bigger servers to meet your needs. Horizontal - using more and more (potentially smaller) servers to meet your needs.
  • 19. Two types of Vertical Scaling at DigitalOcean Flexible - increase CPU and memory temporarily - this can always be un-done and can meet a temporary need. Permanent - increase all of the attributes of your Droplet (CPU, RAM, disk, and bandwidth) - cannot be undone. Both are performed by ā€œresizingā€ your Droplet.
  • 20. Sounds Great! What do I need to know? Resizing requires your Droplet to be powered down, then resized, and then powered back up. e.g You will have an outage in case of a resize! e.g. Your internet famousness will falter! (NO!!!)
  • 21. So when would I want to resize? Before you launch! Doing your development of a new site on the smallest possible instance is cost-eļ¬€ective and makes sense. But before you post your site to /r/ cuteness resize!
  • 22. Vertical Scaling! * Yes - bigger pixels are faster/better/MOAR in this diagram
  • 24. Why Horizontal Scaling? Because sometimes bad things happen to good droplets - Servers Crash. Software bugs bring down a server. The internet just breaks. We try to stop it butā€¦ More importantly - Composing a few smaller servers can be used, and more can be added without downtime!
  • 26. ā€¦ Remember how we got internet famous?
  • 27. ā€¦ But we canā€™t aļ¬€ord downtime with a resizeā€¦
  • 28. ā€¦ Perhaps a new strategy? Like MOAR servers?
  • 29. THE FIRST ā€œEASYā€ STEP LOAD-BALANCING OUR WEB SERVERS
  • 30. The short-versionā€¦ Several ā€œsmallerā€ webservers - all sharing a single database server - are ā€œbalancedā€ by a reverse- proxy server such as Nginx or HAProxy. Greater cost and technical overhead but greater resiliency under failure of a single web-serving droplet. You can add more webservers anytime you like! As many as you like really. And of any size!
  • 31. Ohā€¦ but what about that lone Database server! What happens if it crashes? Or is overwhelmed by a complicated query?
  • 32. Maybe we can scale it horizontally too?
  • 33.
  • 34. THE NEXT-STEP REPLICATING OUR DATABASE SERVERS FOR GREATER RESILIENCY - HYPERDB
  • 35. Database Replication The data on most applications and sites is write-once / read-many soā€¦ We can create replicas of the database holding all of your precious content and have it arrive on other database servers automagically. Each webserver can then query its own copy of the data. In the WordPress world this can be achieved with HyperDB.
  • 36. ā€¦ but what about static assets (like my selļ¬es?!)
  • 38. ADDING A CDN OR NETWORKED FILESYSTEM TO REPLICATE ASSETS
  • 39. ā€¦ that ā€œorā€ If you have constraints on your assets that you control them at all times use a Network Filesystem like Ceph or GlusterFS. If you donā€™t have that constraint CDNs provide many advantages including lower infrastructure complexity, lower-latency, and a specialized services whose only job is to server your assets.
  • 40. TIPS AND TRICKS TO MAKE YOUR LIFE EASIER
  • 41. Use some Conļ¬guration Management When bringing up new servers, it really helps to not have to spend any manual energy doing so - Use DigitalOceanā€™s User-Data, Ansible, Puppet, SaltStack, or Chef. This ensures your life is easier at 4am after three consecutive all-nighters when you need more capacity.
  • 42. You can use vertical scaling with horizontal scaling Once you can add and remove servers to your conļ¬guration, you can add various sizes too! To scale up your entire architecture spin up a new, larger server, and spin down a smaller one. Your Load Balancer will add and remove them as appropriate. Do this until all of your servers are upgraded!
  • 45. References: How to Automate the Scaling of your web application on DigitalOcean Automating the Deployment of a Scalable WordPress Site How to Optimize WordPress Performance with MySQL Replication on Ubuntu 14.04 Automating App Deployments using User-Data