By solidsnake
Hi, I am building a WordPress website for a client that periodically runs sweepstakes on their website. When they announce the sweepstakes they expect to get anywhere from 2-6k users visiting the site at a time. I am trying to figure out what Droplet will be able to handle this level of spikes in traffic. Any info will help, thank you!
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!
Hi @solidsnake,
It’s really hard to actually pinpoint the exact usage you’ll need in terms of RAM and CPU. These parameters might vary based on the server and website optimization, and additionally how heavy the website is. There is no formula to calculate that. What you’ll first need to do is optimize both your website and server.
For the server, I’ll recommend using Opcache + PHP-FPM alongside maybe a database, a caching layer that Redis can help with.
For the website, you’ll need to optimize everything from images to js,css minification, and add some caching plugin. In my experience, for a caching plugin I’ve used W3-Total-Cache.
After you’ve optimized this try to artificially create traffic on the website by creating some scripts to do automatic post requests and see how well the server handles it. After that, you’ll be able to know exactly what size droplet you’ll need to upgrade to.
My recommendation would be to start with a medium-size Droplet, something in the range of s-4vcpu-8gb or s-6vcpu-16gb which translates to 4 CPU and 8GB of RAM or 6 CPU and 16 GB of RAM.
I almost forgot to mention. You’ll need to increase your worker processes in your WebService (Apache/Nginx). These workers are equivalent to sits in a big room. Imagine you have a room with 300 slots, this means only 300 people can enter and sit, if 301 people want to enter and sit, then the last person would need to wait for a slot to be opened by one of the already sitting. The same principle is applied for the workers in Apache and Nginx.
Regards, KDSys
@KDSys thank you for the thoughtful response! W3 Total Cache is definitely on my task list, but will need to spend some time looking into this other stuff. Thanks again!
-SS
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.