Devour The Cloud With Locust Swarms - Hands On Load Testing

Devour The Cloud With Locust Swarms - Hands On Load Testing

Given at CodeMash 2.0.1.8

6b6afbaea3bf1de98975dedc5cd083c1?s=128

stevenjackson

January 09, 2018
Tweet

Transcript

  1. Devour the Cloud Do you have an AWS Account?

  2. nick @stevejxsn @nickbarendt # codemash #devour-the-cloud steve@testdouble.com nick@barendt.com Nick Barendt

    Steve Jackson
  3. None
  4. Setup AMIs http://bit.do/devour-aws

  5. AMIs Saleor Locust ami-da98c7a0 ami-a59bc4df You can also search for

    “CM2018”
  6. If you leave early…. Remember to stop/terminate your AWS instances!

  7. Explore Saleor (our system under test today)

  8. What is Load Testing?

  9. It’s often pictured this way...

  10. None
  11. Load Testing simulates the experience of “many” concurrent users What

    is Load Testing?
  12. Load Testing is not about optimizing the per user experience

  13. Most test tools are bad at Assets Javascript

  14. None
  15. None
  16. None
  17. Needing load testing is a good problem

  18. It’s not hard…. Resource Planning Performance Regressions Architecture Changes

  19. Ok, so what are we focusing on?

  20. Key Question: How many users can I have on my

    site before things break?
  21. Key Question: How many users can I add before performance

    becomes unacceptable?
  22. None
  23. None
  24. Close Enough

  25. None
  26. It’s About Tradeoffs

  27. None
  28. Why Locust?

  29. Simple When will this endpoint fall over?

  30. Record/Playback Easy to get Started

  31. Programmatic Simple -> Complex

  32. DSL

  33. Scales Horizontally

  34. Scales Horizontally

  35. None
  36. Simple Web UI

  37. None
  38. User Signup http://bit.do/devour-signup

  39. Buy! http://bit.do/devour-buy

  40. User Funnel

  41. None
  42. None
  43. None
  44. None
  45. 100% Returning Users (20%) Find Cart Buy 80% 75%

  46. 25% 100% New Users (80%) Visit Cart Buy 97% 50%

    Find
  47. 25% 100% User Funnel Visit Cart Buy 97% 50% Find

    100% Find Cart Buy 80% 75% New 80% Old 20%
  48. Weigh Tasks http://bit.do/devour-funnel

  49. Find a Baseline

  50. None
  51. Identify Bottleneck

  52. None
  53. None
  54. ?

  55. None
  56. Saleor Architecture

  57. Eliminate Bottleneck

  58. Database Laziness Index Connection Pooling

  59. Caching

  60. Async

  61. Current Architecture

  62. Architecture with Caching

  63. View Caching http://bit.do/devour-caching

  64. Find new Baseline

  65. Next Steps Choose Your Own Adventure http://bit.do/devour-advanced

  66. Thanks! REMEMBER TO SHUT DOWN YOUR MACHINES! @stevejxsn @nickbarendt