Low on RAM: Should i get two $20 dollars droplets (to combine 4 cores and 4Gb RAM ) or one $40 dollar droplet (2 cores and 4GB RAM)?
Hello Digital Fellas.
I am getting pretty low on ram (338Mb Available) so i know i will have to upgrade very soon to a bigger droplet. But someone pointed to me that i could also get two $20 dollars droplets instead of one, to separate MYSQL from, Nginx Node, and Apache i guess and have 4 cores instead of 2. Cause Digital Ocean $40 dollars droplet comes with 2 cores and not the 4 than i can get if i pay for two $20 dollars droplets.
This is my setup and how i my current droplet:
I currently have a $20 dollar ubuntu 16.04 droplet with 68 running websites. I know they are a lot but since the websites do not get too many concurrent connections the ubuntu server has been working fine for more than a year now.
I am using Nginx and Mysql for the websites. All the websites have https enabled. (thanks to lets encrypt). and Im using php-fpm for a few websites in need of php. I also have apache configured as the backend for ONE website (you can configure Nginx as a reverse-proxy for Apache), but i am planning to maybe move that particular website to its own droplet, cause its the only one in need of Apache. Basically i have Apache in my server for just one website. And Nginx for the rest.
Also i have discovered in the last few months about the Ghost Blog application which i think its pretty cool. But i had to install node on my server. Since then i have created about six Ghost blogs on my droplet. I have noticed that this ghost blog are pretty RAM consuming. Also every blog has to have its own Mysql database.
Since i have HTOP installed i can run this command:
ps -A --sort -rss -o comm,pmem | head -n 11 and get this result:
mysqld 21.8 node 4.7 node 4.4 node 4.3 node 4.3 node 4.2 node 4.2 php-fpm7.0 4.2 php-fpm7.0 4.0 node 4.0
Also the Digital Ocean Top Processes Graphic gime more or less similar numbers for RAM consumption:
<^>node 34.44 %
mysqld 21.84 %
ghost run 14.39 %
php-fpm7.0 13.66 %
nginx 3.57 %
apache2 2.42 %
systemd-journal 1.43 % <^>
The CPU usage is very Low so it does not worry me. What worries me is that i only have around 338 Mb of RAM left. I am worried in future concurrent connections that might collapse the droplet.
So what do you recommend. Should i go for one $40 dollar droplet or two $20 dollar droplets and separate things? Also how should i separate them? Should i have MYSQL on one droplet and all the other stuff (Nginx, Node and PHP - FPM ) on the other? What are the pros and cons? I am new in this. Thanks in advanced.
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.