Opmize for high traffic

Posted December 14, 2020 534 views
ApacheServer Optimization

Hello, I use digital ocean ubuntu 5$ droplet. I want to optimize it for high traffic. not to crash or slow the website when it gets high spikes of traffic. How do i Find out If I need to change something? and what Should I change to have max stable and fast working website without any slowing downs or breaks and crashes. Thanks

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

Hi there @levanmirvelashvili,

There are different things that you could do to optimize your server:

  • As the $5 Droplet has 1GB of RAM I could suggest starting with adding a SWAP file so that you could have some buffer. You can follow the steps on how to do here:

  • After that, if you are using Nginx as your web server, you could follow the steps on how to optimize it here:

  • Then make sure that MySQL is also optimized by following the steps here:

  • Another thing that I could suggest is going through this tutorial on 5 ways to improve your setup:

A few other things that I could suggest:

  • Make sure to use a CDN to offload some of the load from your server
  • Optimize your website, if you are using a CMS like WordPress, make sure to install a caching plugin

Hope that this helps.

by Alex Kavon
Nginx is a fast and lightweight alternative to the sometimes overbearing Apache 2. However, Nginx just like any kind of server or software must be tuned to help attain optimal performance. Here's how to optimize Nginx configuration.