Question

Looking for the best load balancing solution for a very busy wordpress site

Hi

I have read numerous articles and tutorials here regarding wordpress load balancing and I see a mixture of solutions ranging from traditional round robin multi-droplets behind a DO load balancer to using GlusterFS and docker swarm or using Kubernetes.

My current situation is getting out of the control of a single box. I have 150,000 members in a membership site and blog that can’t handle anything greater than 1000 requests per minute – this happens after email promoting a particularly “interesting” article.

I want to be able to load share the blog and maintain database access for the memberships - perhaps using DO database.

These types of situations are hard and time consuming to setup and test and I wondered if there are articles talking about the issues that I may be facing. Assets need to be shared so maybe using spaces as part of the solution would be prudent and the blog pages must be served by some round robin type balancer that is easily scaled. Additionally, the membership site is hampered by having chosen BuddyBoss as the platform … The database activity is massive. I had to shut down the communications package included with BBoss because of number of slow queries swamping the 40 processors.

I am interested in possible Kubernetes solutions as they can be scaled inside scaling blocks and spaces – however I am interested most in knowing if there is a ‘best’ approach.

Thank you for any help and for suggesting articles.

Jack


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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Jack,

Having worked on scaling these types of sites, including with WP and BuddyPress dozens of times, I can tell you that it will require a multi-faceted approach beyond just trying to horizontally scale processes using k8s orchestration.

As you’ve already experienced, your biggest bottleneck is the database. You’re going to need to look into using object and query caching, potentially at both the app and db level, to pull some strain off of the db. As well, you should analyze the db logs to see if there are any ways to optimize the database, either through a larger query cache or additional indexes.

At the end of the day, the key-value store architecture of WordPress can be challenging to scale, especially since the problems only burgeon over time.

To handle traffic spikes, you might want to look into reverse proxy caching in a micro-caching type of architecture, using something like Varnish. Even caching things for as little as 5 seconds can help you withstand exponentially more traffic just because most requests end up being cache hits. Also, memcached and Redis is your friend.

I don’t think you’re going to find a single article that gives you a beginning to end, tailor made solution for what you’re experiencing, unfortunately. However, it’s a very good problem to have!