Question

Need advice on how to gracefully handle server load & spikes for WordPress site.

I have two $5 droplets currently. One is hosting the WordPress webapp and the other is the corresponding MariaDB database. When starting out a free load test from loadimpact.com, the site is operating fine, but the site gets slower as the test continues to ramp towards its 25VUs.

By the time it gets to around 20, its pretty much inaccessible and I can see the top shows a ton of php-fpm’s spun up. It takes about another couple minutes until they’re done executing before the site returns to normal.

I know I can increase the droplet size or even start load balancing with replication, but what do I do about unanticipated site spikes that are not planned through the vertical scaling techniques?

This is a Ubuntu 18.04 setup running nginx/apache, there’s Redis caching, Cloudflare caching, and the basic site caching on.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

jarland
DigitalOcean Employee
DigitalOcean Employee badge
September 18, 2018
Accepted Answer

Hey friend!

I would try a different static page caching plugin for Wordpress. There are a few. If page caching works at it’s best, PHP processing should be next to none. Possibly try disabling other plugins one by one too, while doing load tests, to see if there may be one that is responsible for all of the processing time that’s causing them to stack.

Jarland

I understand you,

You want to handle sudden spikes in the best economical way, which is autoscaling, i remember i did quick search and found out google app engine does that exactly and im using it now but the bills are around 170$ monthly! And i have 0 to 3 users max! So im back to digital ocean to find a way, so far i learned the only way is to upscale/downscale manually through the dashboard which is just not right. Hope some1 helps

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel