Last updated: January 11, 2023
When creating a website, one of the first important choices you will need to make is choosing a hosting for your site. If you expect to receive a large number of visitors to your site, such as 10000 visitors per day, it is essential to choose a hosting that can handle such a traffic load.
In this article, we'll take a look at the different hosting options available for high-traffic websites, and help you decide. what type of hosting is best for your site based on your performance, cost and flexibility needs.
Web host for a site with 10K visitors per day?
To be able to make your choice, you must first have a precise idea about how your website works.
Today, while there are a ton of free CDN options and caching plugins, even shared hosting can easily handle a site with 10000 visitors per day.
4 parameters to take into account when choosing a web hosting
Choosing the right hosting depends entirely on your site and its content. An optimized website is not like an unoptimized site.
Most people think that having a super powerful VPS server is essential for handling a large number of visitors per day, but that is not true. As long as your website is well developed and optimized, the site will remain in good condition.
In order to ensure that your website runs smoothly, there are therefore four variables that define the best web hosting for a website with 10000 visitors per day:
- The number of visitors connected at the same time.
- The number of requests for the most visited web pages and their complexity.
- The weight of your web pages (images are among the elements that increase the weight of web pages the most).
- The power of the server (processor, RAM).
- The type and size of disk used to store files as well as the database.
Calculate the number of visitors your host can support
One of the very first things we learn when you take on performance tuning work is that before you can improve performance, you must first. measure.
Without being able to measure how fast something is working, we can't tell if the changes made improve performance, have no effect, or even make things worse.
So in order to determine which accommodation is right for you, it is best to calculate the approximate number of users that you can have simultaneously on your server.
The magic formula that I personally use in my estimates is as follows:
Display the number of CPU cores of a Linux server
To use this formula, you must first know the number of cores available on your server.
The CPU or processor is the one that interprets and executes instructions, processes data and performs tasks such as broadcasting web pages and executing requests in a database.
A high number of processors increases the speed and efficiency of the server, which can thus execute more instructions in a shorter time.
To quickly find the number of cores your server has on Linux, just open an SSH terminal from your server and enter this command:
In this example, the server has 24 hearts. The number of cores sets the limit on the instructions you can run before the server reaches its maximum capacity.
In short, you don't have to know what this number means. You just need to know that when it exceeds 24 (if you have 24 cores) then your server is overloaded.
How long does it take for the processor to run your web page?
The other metric we need is the average response time of web pages of your website.
The easiest way to do this is to analyze a few different pages on your website.
To do this, follow these steps:
- Open a web page of your website from the Chrome browser.
- Right click on this page, go to Inspect.
- Now click on the tab Network and refresh the page.
- Finally click on the main resource that has loaded and press the tab Timing.
In the example below we can read that the time spent running the home page is 433 ms or 0,4 seconds.
What is the relationship between CPU cores and web page response time?
When a visitor accesses your web page, the server is busy producing that web page until you receive it. For the example above, the processor is busy for 433 milliseconds when producing this page for you. With 1 processor core, the server limit would be to provide 2.5 pages per second.
To calculate the maximum capacity of your web server, here is the formula:
The capacity of our servers is 24 processor cores, so when each query on the website uses on average 0,433 seconds processor time, we can expect it to be able to process approximately 24 cores / 0,433 second of processor time = 55 requests per second.
Calculate how often your users click on average
As we saw in the first formula, in order to know how many simultaneous users you can have on your site, you must also know the frequency with which your users click on average.
To do this, simply open the tool Google Analytics.
Then go to Audience> Overview, you will find the average session length and the number of pages per session.
The duration of the session in this example is 1 minutes and 2 secondsEither 1 × 60 + 2 = 62 seconds. Each user clicks an average of 1.28 times.
Divide the average session length / number of pages per session and you will get 48 seconds. This means that the average user of your website will click around once every 48 seconds.
When we know that an Internet user in Google Analytics clicks once every 48 seconds, and we know that the server capacity is 55 requests per second, we can now calculate a fairly precise estimate;
55 requests per second * click interval in minutes 48 seconds = 2640 simultaneous users maximum in Google Analytics.
There are a lot of questions you can raise regarding this way of calculating, but in my experience this way of calculating gives pretty accurate estimates.
How many visits can I have on a VPS?
If you run your site on a VPS with only two processor cores, the capacity limit can be reached much faster. For example:
Click frequency: 40 seconds
2 cores / 0,4 = 5 page views per second * 40 = 200 simultaneous visitors max .
Choosing a web host for a website with more than 10000 visitors is quite difficult when you know that hosting companies are trying to trick you.
If you are just starting out, there is no need to purchase VPS or Cloud hosting. You can opt for any shared hosting. Be aware that even shared hosting can easily manage a well-optimized site having 10000 visitors per day or more.