Koolaidrain

HackRU Load Tests

Feb 28th, 2016
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. We used Locust to load test the HackRU server.
  2.  
  3. I created tasks that accessed every route on the server at about the same frequency,
  4. with the homepage and account POST routes accessed twice as much as the default frequency,
  5. by using the weight field of the task decorator on the methods of the User Behavior class,
  6. which was defined as the task_set of the Website User class that extended HTTP Locust.
  7.  
  8. We reasoned with the kinds of loads and usage spikes we would have to handle.
  9. -> Assume 800-1000 attendees. Assume 1/3 of registrants attend.
  10. -> Assume 3000 registrants. Assume 1% of site visitors sign up.
  11. -> Assume 300,000 requests.
  12. ...
  13. -> Assume 1000 register in the first week, and 300 in the first day. (From last semester)
  14. -> Maximum load will then be ~10,000 requests/day. Assume 90% of users register from noon to midnight.
  15. -> 9,000 requests/12 hours = 750 requests/hour = 31.5 requests/min ~ 0.5 requests/sec
  16. -> With these assumptions of high load, even spikes of 40x standard loads would be safe to handle.
  17.  
  18. http://imgur.com/nflRPlG
  19. -> At 1000 users and ~20 requests/second, we see 50,000 requests send without a single failure.
  20. -> The few requests that seem to have failed here are due to to client side errors where HTTP headers are empty.
  21.  
  22. http://imgur.com/h73hVEs
  23. -> At 200 users and ~100 requests/second, we see 50,000 requests send with a ~10% failure rate.
  24. -> These requests that have failed are due to "database locked" issues where two locusts try to register simultaneously.
  25.  
  26. -> At 2000 users and ~100 requests/second, the "database locked" issues cause a 50-60% request failure rate.
  27. But massive load spikes like this are not expected given our assumptions, and as this would be a spike,
  28. a browser sending these requests would have a stable connection and still render the website usable.
  29. While the above load test was happening, we used a browser and the average delay on buttons site-wide were 3-10 seconds.
Add Comment
Please, Sign In to add comment