Load testing site

Load testing site

Each site (hosting) has its own resource - the maximum possible load that it can withstand, after which it will be lost or put in 404 error. Load testing site - a tidbit not only testers or site developers. But also intruders who are profitable, take you out of the competitive niche and send the site to the knockout. On a fictional example, we will consider with you a situation in which we will show that the load testing of a site is extremely necessary for an average and highly developing business.
 
Imagine a person who has gone from outdated sales methods and is moving a little to Internet resources. For example, he sells women's accessories (jewelry). And at one moment, calculating the rental price and analyzing the income, he recalls that his friend once told him that now you can do all this in an online store and not pay rent, etc. And everything is so good with a friend: profit, increase in sales, growth. But there is a huge "BUT". We forgot to say that this friend is selling clothes. And the type of clothing is so unique that it has only a few foreign competitors. It turns out that he spends for example: $ 200 (hosting + domain) + $ 300 (programmer’s services) = $ 500 / year. And he has an average profit of 4-5000 $ / year. Elegant is not it?
And our character acts just like his friend. He buys a hosting and orders the creation of a site, forgetting to analyze the Internet market by its subject. He pays SEO optimizers and now his site is in the top 10 in the field. What happens next? It is simply squeezed. How? Vulnerability CMS, layout or hosting. In principle, anything even a module or plug-in on its site can lead to a load on the site and subsequently the server. His site leaves a minimum of 404 error, and when resuming his work using reboot. The server again goes into the same error (state). I will not further develop this fictional story and follow the further actions of our character just because there are two ways out:

  • tidy up the hosting resource (server) security issues
  • give up

Load testing site - error analysis

Let us proceed better to the analysis of errors and the construction of an algorithm to prevent such problems.

  1. Analyze your customer and competitors. Find out the approximate load on competitors' sites. What equipment is needed for the site? if the competitive niche is 200-300 visitors per day (as much as possible), the usual hosting with php memory limit 256-512 mb + apache is enough; if you need to use dedicated (virtual) hosting, go to the next item (in case of the first question, the second item can also be completed).
  2. Selection of equipment or server har (hosting). For this question you can contact us. The programmer will conduct the necessary checks and provide you with a one-time consultation with an explanation of all the details (price: 500 UAH).
  3. Testing hosting (server). In the event that you do not order, but make out and collect your server, the algorithm of actions will be different. But in the end, it is still necessary to conduct testing. To do this, look for a resource like Loadimpact, test it and get this result: the site can withstand a load of 50 users. In the event that the load is needed 300+ users go to the search for other resources.

Load testing site - the elimination of error 404

Load testing of the site, on this service here BrowseMob takes longer. But we get the final result, which will say that the server can withstand more than 1000+ users simultaneously. Since our article is about site load testing, we will talk about testing using Apache or PHP technologies.
The algorithm described above is suitable for servers, sites and applications. It is necessary to understand it, because despite the fact that it is you testing, the load still falls on the server hardware. Let's go back to testing.

Load and benchmarking: what's the difference?

There is load and reference testing and it is important to understand the difference between them. Load testing is aimed at disabling the application or site. And benchmarking is aimed at clarifying how many requests per minute or second a server can perform.
We will speak on the example of PHP as it is in principle the main language of WEB development after JS (javascript). PHP itself is quite fast in terms of speed of requests and responses. But people often forget that to the response time of PHP itself, you can freely add the speed (response) of the hardware itself. Therefore, it is very important to know the critical point at which your equipment (server) will fail or go into error. Wielding knowledge on this issue is always possible, you can estimate when you need to add equipment or to distribute the load by placing and dividing into a couple or more servers.

Also, later, you can identify the weaknesses of the platform or application and fix them. There is an excellent open-source program Siege (recommendation) that can be configured to read a large number of URLs from the configuration file and regressive testing (defendant) or a random read from the URL list.
 
Thus you can simulate the actual use of the site and the load on it. Knowing the vulnerability in your site or application, you can solve the issue of security and load site. And since the program is absolutely free, you can use it by constantly finding and correcting the shortcomings of your site or server.
 
What is the conclusion? Of course, for each person the load testing of the site will seem unnecessarily expensive in money or time. But forewarned is forearmed! You can order from us more detailed advice on security issues or testing of your sites, as well as the performance of the necessary work.

No comments

Add a comment