source:. http://habrahabr. ru/blogs/hi/109247.
Author: sunnybear.
Check the site resiliency. This is another post of their traditional New Year's eve is a series of site verification of fault tolerance and a willingness to accept all of your visitors puzzled choice of gifts or New Year's discount. In this issue I will discuss the creation of tests in verbose mode using record actions (Proxy recorder), which allows almost completely emulate the behavior of real users in real browser on your website. Also some will be discussed by analyzing the graphs themselves resiliency.
So there you go.
We'll discuss the use of service. Load Impact. First we need to make the actual test.
Creating a test.
Record of Action (Proxy recorder) is available in.
>>Advanced mode - Load script generation - Record session.
Here you can specify a set of HTTP-requests to emulate any visits to your site, and any number of concurrent users. Very handy tool. To use it you need only specify the appropriate settings on your browser. As for the settings.
If you use a proxy it is possible to test all the dynamic and AJAX- requests: includes a visit to the site they just recorded and then available in the appropriate field when you create a test....
Finally, the last stage in the formation of the test - a choice of limits for users and a step increase in load.
For a simple test failover site, you can specify a limit in the area of 500-1000 users in 100. This will completely sane site picture of the behavior under load, but greatly reduce the time of testing, and limits on traffic.
If necessary, a detailed picture will specify the amount of 10-20 members. This ensures that the test will tell you exactly what you get true power rating site.
Once all parameters are set, you can confirm test ( for users of less than 500 - the usual formal, then it will be necessary if the file loadimpact. txt with your login to the site root ). Also, when you save the settings made a trial run to see if everything is set to true.
Run the test.
Now the most interesting. After we spent a few ( tens of ) minutes, which set up a test, it is time to start and. Self testing can take up to several hours ( if a lot of steps), and in general it is best done in a period when the user activity (eg at night). After the test you get a lot of summary charts, let's take a look at them.
Server response time reflects the cost of the server to create a HTML-document with an appropriate number of simultaneous visits to the site. There will be a critical point in 10-15 seconds, when up to 80 % of users will simply leave the site without waiting for its loading. Also, when sootvetvuyuschih server settings can begin to be granted a timeout error (nginx, for example).
For a schedule of good sites like resiliency exponent (as in the example above), which crosses the value in 10 seconds 3-5 times more than the current peak load. This means that the sudden increase in the number of visitors your site is, in principle, bear the load.
Worst case, if the graph is going up dramatically, even with an increase in the number of visitors in 2 times (or even at the peak value ). In this case, you need to take action optimizing, and urgently.
But it's good, when any ( test ) load schedule will be a straight line ( with minor deviations). This means that the margin of stability at the site is very good, and oen.
summary.
Load Impact. is a unique tool for load testing, and thus allow themselves to ask any scenario, user behavior and to check how the site ready for them. At the same time a lot of information available free of charge during the test up to 50 users.
I hope this article helps you prepare your sites for the New Year boom:).
No comments:
Post a Comment