Question

Using DigitalOcean features to create a reliable server architecture

Posted November 16, 2018 1.4k views
ApacheLoad BalancingHigh AvailabilityUbuntu 16.04

Today I have several droplets for single tasks:

  • Apache / PHP - Quantity: 1
  • PostgreSQL - Quantity: 1
  • NodeJS - Quantity: 1
  • ElasticSearch - Quantity: 1

Unfortunately on November 14, 2018 one of these droplets went offline due to a hardware failure on the server and the Hypervisor was under maintenance.

I know this has little chance of occurring, but when it did it caused huge inconvenience for us.

What would be the best way to use DigitalOcean’s features to prevent this? That is, when one server crashes there is another ready to run immediately.

Can using the load balancing feature solve this? Are there any risks of both droplets having hardware failure?

What are your suggestions?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello,

Just came across this question. I believe that a good setup using the DigitalOcean products would be:

  • A Managed Loadbalancer to distribute the traffic between your Servers
  • A couple of Droplets behind that Load balancer to serve your Apache/PHP application
  • A Managed PostgreSQL cluster so that you could have a stand by failover node
  • Spaces for your static files

The setup would look like a little bit this:

This is taken from this tutorial here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-scalable-laravel-6-application-using-managed-databases-and-object-storage

This tutorial is specifically for Laravel, but the scaling itself is applicable to all kinds of applications.

Best,
Bobby

by Bobby Iliev
by Erika Heidi
Data persistence and file storage represent two of the biggest challenges when horizontally scaling web applications. This is mainly due to the fact that it is hard to maintain consistency of variable data between multiple application nodes. A practical way of meeting these demands is by using managed databases and object storage. In this guide, we will update an existing Laravel 6 application to use a managed MySQL database and an S3-compatible object store.