2. Intros - All Around
David Worth (firstname.lastname@example.org)
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
DigitalOcean is a “Cloud Provider” e.g.
17. NOW I NEED TO DO
… HAVE YOU TRIED
18. The two types of scaling:
Vertical - using bigger and bigger servers to meet
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
Permanent - increase all of the attributes of your
Droplet (CPU, RAM, disk, and bandwidth) - cannot
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
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/
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
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
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?
35. Database Replication
The data on most applications and sites is write-once /
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
In the WordPress world this can be achieved with
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.
41. Use some Conﬁguration
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
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
How to Automate the Scaling of your web
application on DigitalOcean
Automating the Deployment of a Scalable
How to Optimize WordPress Performance with
MySQL Replication on Ubuntu 14.04
Automating App Deployments using User-Data