SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

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

En vedette

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
 

En vedette (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...
 

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

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

Dernier

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Dernier (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

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