Report this

What is the reason for this report?

When do you move your database to a separate server?

Posted on February 7, 2020

This is more of a conceptual question about when is the appropriate time to spit a database server off to it’s own droplet.

So say you have a LAMP type solution running on a 2vcpu/4GB droplet and you think it’s time to get some more capacity. Doubling the size of the droplet is easy, but is that the right way to go? Spinning up a separate database server is another option with some advantages and some disadvantages.

Advantages:

  • Isolated database cannot be stopped by overloaded processes on the web/application server.
  • The database is further isolated from a security perspective.
  • Problem diagnosis and performance monitoring is easier as the web and database loads are separated.
  • Simplified maintenance and upgrades because the web application can be pointed at a new/replacement database server that is already tested and operational.

Disadvantages:

  • network latency for requests to the database server (same datacenter)
  • less overall capacity for a spike in resources needs by the web application processes or the database.

I’m split right down the middle on the advantages vs disadvantages and thought I might find some interesting and informative opinions in the DO community.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.