Blast your app with Gatling! by Stephane Landelle

6,351 views

Published on

Published in: Technology

Blast your app with Gatling! by Stephane Landelle

  1. 1. Load testing made easy Stéphane Landelle @ eBusiness Information @slandelle
  2. 2. Load Testing" Gatling" Demo
  3. 3. Load Testing" Gatling" Demo
  4. 4. Load Testing" Gatling" Demo
  5. 5. Load testing? About performance About server side In “real” conditions
  6. 6. Performance What for?"
  7. 7. It’s all ‘bout the money!" Conversion rates" Platform costs Performance What for?" (from business POV)
  8. 8. " " Results/page : 10 => 30 è +500 ms " è -20% pages seen
  9. 9. è -1 % sales" è Estimated loss: $160M/y +100 ms
  10. 10. Performance" What for?" (from dev POV) Fun!" (happens to be useful too)" Anticipate" Reproduce" Train
  11. 11. How?" " "
  12. 12. How?" " Define goals" èRequirements
  13. 13. How?" " Analyze" èData" èMonitor
  14. 14. How?" " Simulate" èBehaviors" èInjector
  15. 15. How?" " Iterate!!!"
  16. 16. Jmeter, The Grinder, LoadUI, Tsung, Locust, Load Runner, Rational, NeoLoad…
  17. 17. Issue #1 High Performance
  18. 18. 1 user = " 1 thread
  19. 19. 50 threads on a JVM
  20. 20. With 2000 threads
  21. 21. Blocking I/O
  22. 22. Threads ?" Waiting…
  23. 23. … and sleeping
  24. 24. JMeter 2.8 perf test, expecting 300 tr/sec Can you trust your results ?
  25. 25. JMeter reference test with Gatling, expecting 300 tr/sec
  26. 26. Usability Issue #2
  27. 27. Listen, it's not that complicated... Graphical User Interface
  28. 28. Maintainability Issue #3
  29. 29. What is this change about ?
  30. 30. Gatling can change all that !
  31. 31. Synchronous" " 1user=1thread" " Blocking I/O - Asynchronous - Actor model - Non blocking I/O
  32. 32. Actors
  33. 33. NIO
  34. 34. Reach new limits
  35. 35. From the Play2 Computer-Database sample. (cf: https://github.com/gatling/computer-database)
  36. 36. Scenario " Scala code" DSL " = =
  37. 37. Use the rich DSL … Checks regex / css / xpath / jsonPath find / findAll / count is / in / not / whatever Structures doIf / repeat / during / asLongAs randomSwitch / roundRobinSwitch Error handling tryMax / exitBlockOnFail Feeders csv / tsv / jdbc
  38. 38. … or write your own " Scala code…
  39. 39. … or use the Recorder
  40. 40. •  Maven Plugin •  Maven archetype (run in IDE) •  Jenkins plugin •  Graphite live reporting
  41. 41. Coming soon… •  Websockets, JDBC… •  Clustering
  42. 42. Demo
  43. 43. http://gatling-tool.org http://github.com/excilys/gatling @GatlingTool

×