I hear this question weekly
This past week I was on a call with a partner of ours and one of his clients. If you don't recall, I work as the VP of Products at Nexcess – a hosting company. We were talking about a pretty large site, and the client wanted to talk technology.
Near the end of the call I started to wonder if they would ask the question. I expected it. And was a bit surprised it hadn't come up. But then, just before we wrapped up, the question came.
“How do I determine the size of the web server?”
Another way I get the question,
“How would I figure out which plan is the right one to start with?”
I hear it all the time. So today I thought I would walk you through some of the calculations I suggest you do.
How to size a server based on your traffic and site details
The most important dynamic is to understand how much your solution must scale. Some people need dedicated servers. Others simply need a VPS. To determine what’s best, we need to calculate what kind of load you need to support.
Step one – we need to know how big your pages are. The wrong page builder, for example, can drive page weight up by 300%. It's why your theme matters. And every plugin you activate on your site. It's not the count of plugins, but how well they're coded.
Don't focus on page size. Instead look at CPU utilization.
So like I said, measure it by CPU time (rather than file size). Let’s assume that the average size of your most common pages is 380 ms or .4 seconds. How do we get that? We measure that by adding Content Download to Time to First Byte. You can get this data from tools like GTMetrix.
Step Two – we need to know how many requests we can handle per second. Depending on how many CPU cores you have, you can serve 2.5 pages per second per core (1 core / .4 page size in seconds). What that means is that if you have a dedicated server with 32 cores, the math is 32 / .4, or 80 requests per second.
Step Three – we need to look at sessions and requests. We need to know how long people spend on the site in a session, and how many times they click. Let’s say people spend an average of 5 minutes (5*60=300 seconds). Every user clicks 5 times. So that gives us the Average Session Duration (300 seconds) divided by Pages per Session (5) for 60s. This means one click per minute.
You can see what happens when we know these three things. Right?
Let's say we have 80 requests per second * 60 seconds * 1 click per minute. That means a 32 core server could handle 4,800 simultaneous users. That's a lot of concurrent users!
Of course, if you have a 2 core server, you could handle far less concurrency.
This is why sizing a server up front is so important.
Because no one wants to get a lot of requests, only to find out their server wasn't sized correctly.
Of course, there are a couple more nuances, like whether you're running an eCommerce store and collecting the specific data you need to size hosting for an online store.
What about Cache?
When it comes to performance, and sizing a server, I'll tell you that you should think about cache as a nice cherry on top. If your hosting and server is fast without it, it will be fast with it.
But don't use cache as the way to speed up your site. Because then you end up dealing with content that can't be cached (like online courses, membership sites, and online stores), and that's when you realize you needed a more powerful server.