is loading...

Contact Information:

01.

News

Site load testing

September 4, 2017
Comments (0)
797
Site load testing

Each site (hosting) has its own resource - the maximum possible load that it can withstand, after which it will be lost or put in a 404 error. Load testing of the website – a tidbit not only for testers or website developers, but also for attackers who benefit from taking you out of a competitive niche and knocking out your site. Using a fictitious example, we will consider a situation with you in which we will show that load testing of a site is extremely necessary for a developing business.
 
Imagine a person who has moved away from outdated sales methods and is moving a little bit to the Internet resources. For example, he sells women's accessories (jewelry). And at one point, while calculating the price of rent and analyzing 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 mention that this friend sells clothes. And the type of clothing is so unique that it has only a few overseas competitors. It turns out that he spends, for example: $200 (hosting + domain) + $300 (programmer services) = $500/year. And his profits are on average $4-5000/year. Gorgeous isn't it?
And now our character acts in the same way as his friend. He buys hosting and orders the creation of a site, forgetting to analyze the Internet market on his subject. He pays SEO optimizers and now his site is in the TOP 10 in the field. What happens next? It's just squeezed out. How? Vulnerability of CMS, layout or hosting. In principle, anything, even modules or plugins on his site can lead to a load on the site and subsequently the server. His site goes minimally into a 404 error, and when you try to resume your work with a reboot, the server goes back to 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 security issues of the hosting resource (server)
  • Abandon this venture

Load testing of the site - error analysis

Let's move on to analyzing errors and building an algorithm to prevent such problems. Analyze your customer and competitors. Find out the approximate load on competitor sites. What equipment is needed for the site? if the competitive niche is 200-300 visitors per day (maximum), regular hosting with a php memory limit of 256-512 mb+apache is sufficient; if you need to use dedicated (virtual) hosting, go to the next paragraph (in the case of the first question, the second paragraph can also be completed).

Selection of equipment or characteristics of the server (hosting). On this issue, you can contact us. The programmer will carry out the necessary checks and provide you with a one-time consultation explaining all the details.
Hosting (server) testing. In the event that you do not order, but arrange and assemble your server, the algorithm of actions will be different. But in the end, testing still needs to be done. To do this, we are looking for a resource of the Loadimpact type, we test it and we get the following result: the site can withstand a load of 50 users. In the event that the load is needed by 300+ users, we proceed to search for other resources

Load testing the site - fixing the 404 error

Load testing of the site on the BrowseMob service takes longer. But we get the end result, which will say that the server can handle more than 1000+ users at the same time. Since our article is about load testing of the site, we will talk about testing using Apache or PHP technologies.
The algorithm described above is suitable for servers, sites and applications. It must be understood, because despite the fact that you are testing, the load still falls on the server hardware. Back to testing.

Load Testing vs. Benchmarking: What's the Difference?

There is load testing and benchmark testing, and it's important to understand the difference between the two. Load testing is aimed at bringing down an application or website. And benchmarking is aimed at clarifying how many requests per minute or second the server can execute.
We will talk about PHP as an example, since it is basically the main WEB development language after JS (javascript). PHP itself is quite fast in terms of query and response speed. But often everyone forgets that you can freely add the speed of the operation (response) of the equipment itself to the response time of PHP itself. Therefore, it is very important to know the critical point at which your equipment (server) will fail or go into errors. With this knowledge at all times, you can evaluate when you need to add hardware or distribute the load by placing and splitting into a couple or more servers. Also, later, you can identify the weaknesses of the platform or application and fix them. There is a nice open source program Siege (recommended) that can be configured to read a large number of URLs from a config file and regression test (under investigation) or randomly read from a list of URLs.
 
In this way, you can simulate the actual use of the site and the load on it. Knowing the vulnerability on your site or application, you can solve the issue with the security and load of the site. And since the program is absolutely free, you can use it, constantly finding and correcting the shortcomings of your site or server.
 

What is the conclusion?

Of course, for each person, load testing of the site will seem unreasonably costly in terms of money or time. But forewarned is forearmed! You can order more detailed advice on security issues or testing your sites, as well as performing the necessary work from the specialists of our web studio.

Send comment