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

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

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Thanks for the great tutorial.
If I want to make the 2 Nginx droplets stay in sync ( files and MySQL database ), what should I do?
I am setting up a wordpress multisite network.
Thank you.
@tangrufus: You will need to setup a mysql server that both nginx servers connect to (<a href=“https://www.digitalocean.com/community/articles/how-to-secure-mysql-and-mariadb-databases-in-a-linux-vps”>https://www.digitalocean.com/community/articles/how-to-secure-mysql-and-mariadb-databases-in-a-linux-vps</a>) and share the wp-uploads directory between both servers (<a href=“https://www.digitalocean.com/community/articles/how-to-set-up-an-nfs-mount-on-ubuntu-12-04”>https://www.digitalocean.com/community/articles/how-to-set-up-an-nfs-mount-on-ubuntu-12-04</a> or <a href=“https://www.serverstack.com/blog/2013/01/25/using-glusterfs-on-your-managed-server/”>https://www.serverstack.com/blog/2013/01/25/using-glusterfs-on-your-managed-server/</a>).
Thank you!!!
If I use asw s3 to sync the media files on the 2 Nginx droplets, would the media files be cached by the Varnish droplet? (or, it would be pulled directly to clients?)
Dear Hope you’re fine and doing well.
This was really a great help. An amazing article. But I need to ask something. Are those instance of nginx1, nginx2, varnish1 all resign in 3 different separated servers?
Regards
I alright then. So its possible to install varnish in one server that not running Apache or Nginx at the same time but it use them as back ends from other servers right?
Got it.
Thank you again
This tutorial is greatly outdated. The current version of Varnish in the repo is 4. They’ve changed the syntax a LOT!
You need the following round-robing for your default.vcl file:
vcl 4.0;
import directors;
backend nginx01 { .host = “XXX.XXX.XXX.XXX”; .port = “http”; }
backend nginx02{ .host = “XXX.XXX.XXX.XXX”; .port = “http”; }
sub vcl_init { new rr = directors.round_robin(); rr.add_backend(nginx01); rr.add_backend(nginx02); }
sub vcl_recv { set req.backend_hint = rr.backend(); }
This comment has been deleted
I have a question:
My Nginx servers need to be on the same configuration that varnish server? I mean, varnish runs NodeJs or PHP or wherever… What do I need to do on Nginx “mirror” servers?