SlideShare uma empresa Scribd logo
1 de 45
Baixar para ler 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 first 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 selfie 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-effective 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 afford 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 selfies?!)
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 Configuration
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
configuration, 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

Mais conteúdo relacionado

Mais procurados

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
 
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
 

Mais procurados (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...
 

Destaque

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
 
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
 

Destaque (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...
 

Semelhante a 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
 
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
 

Semelhante a 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
 

Último

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Último (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

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!
  • 8. AND OUR “ONE-CLICK” APPLICATIONS
  • 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 first 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 selfie 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-effective 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 afford 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 selfies?!)
  • 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 Configuration 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 configuration, 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