Can I use two droplets for one website?

Posted January 30, 2016 5.8k views
MySQLServer OptimizationConfiguration Management

Can I use one droplet for my website whilst another droplet for the MySQL, xmpp chat, images/videos. The problem is that I have easily exhausted my Disk space whilst I dont really need the huge RAM/CPU.

Our site, a social website has lots of images and then we are having “A Database Error Occurred. Unable to connect to your database server using the provided settings ” messages often.

Will appreciate words of wisdom from a kind member

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
2 answers

One option would be to use DO private networking. Where one droplet would host your application server and the other would hold the database. Or maybe have your master droplet remote mount directories from your slave droplet. In both examples, you would probably want all of those resources only directly accessible behind the firewall. NOTE: private networking need to be located in the same data center, last time I looked.

Another tool to use with multiple droplets is to use DNS to seperate your URI’s, such as one droplet serving your http or https URIs, and another droplet being your ftp resource. Even though both droplets would be directly accessible, you can still use private networking between your droplets to have your server apps talk to your privately networked database.

by Justin Ellingwood
NFS is a remote file system protocol that allows you to mount remote shares on your local machine. In this guide, we will demonstrate how to use NFS on two Ubuntu 14.04 servers.
  • Thanks @gndo for your kind response. However, is it possible that I host the images/video on S3 whilst I host the application server and database on DO’s two droplets in the same datacenter

    • @ogbongefriends1 - I don’t know, but I’m thinking remote mounting AWS filesystems to DO droplets would incur enough network delays that may trigger timeouts during filesystem accesses. Sorry, but I don’t have another simple system level solution to suggest.