Considering you will be using $5 Droplet, biggest bottleneck you will have is RAM memory. It has only 512MB RAM, which is not enough for running any site. As of Ubuntu 16.04, minimum for MySQL is 1GB of RAM, so you already needs 512MB more to run MySQL flawless. If your MySQL, or even Apache/Nginx runs out of memory, it will get killed. Result of it is downtime until you notice it and manually restart services.
You can get over it by Adding Swap To Your Droplet. It is required step, consider adding at least 1GB to 2GB.
You can take look also at:
- Optimizing MySQL configuration (
my.cnf). There are memory settings in
my.cnf which can be adjusted to lower usage. But you should test it, so your site is not to slow or goes down.
- Look at MySQL forks, especially MariaDB and Percona. - I’m not so sure about it, maybe someone who have more experience can comment, but you should research about resource usage and speed on all 3.
Next you should consider is Caching.
In case you are using WordPress, most easiest way is adding plugin for it. W3 Total Cache or WP Super Cache is recommended ones.
Well if this is not a case, server-side caching would be required.
In my opinion, Nginx would be most easier to setup for caching. Even I think you would get better performance with it Nginx.
In addition to links @newbie give you, I would add GZIP compression.
Next, I would take care that content size (images, html, css, js) have as low as possible size.
As for static images compress them using some service you prefer. I can recommend you tinypng, which can compress
.jpg. For me it is working perfectly and results are very good.
About HTML, CSS and JS consider minification. This will reduce size of it and loading time will be faster. In case you use WordPress for blog, W3 Total Cache can take care of it for you. If this is not a case, learn more about gulp, you can create little script that will do it for you. Just be sure to test it out before putting in production.
This is not so not important step, it will save you bandwidth, and you will have less content to cache.
If I get more on mind, I will edit or post comment. If you need help, ask anything, I or anyone other will try to help you :)
How fast a website will load depends on the size of all of the files that have to be downloaded by the browser. Reducing the size of files to be transmitted can make the website not only load faster, but also cheaper to those who have to pay for their bandwidth usage. In this guide, we'll discuss how to configure Nginx installed on your Ubuntu 14.04 server to utilize `gzip` compression to reduce the size of content sent to website visitors.