Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Gatling : Load Testing like a King

Gatling : Load Testing like a King

Gatling and rails app

mestachs

May 09, 2014
Tweet

More Decks by mestachs

Other Decks in Technology

Transcript

  1. a DSL emulates real user behaviour val scn = scenario("Login")

    .exec(http("My website") .get("/login") .headers(headers_1) .check( regex("""<meta content="(.*?)"name="csrf-token">""") .saveAs("auth_token")) .exec(http("Login") .post("/login") .headers(headers_5) .param("csrf-token", "${auth_token}") .param("username", "xxxx"))
  2. Scalable Engine : Not a thread per user Actor based

    concurrency Java 7 Asynchronous Good GC NIO framework
  3. Average & StdDev : never again ! average of 1.2

    seconds and standard deviation of 0.6 seconds
  4. Average & StdDev : never again ! average of 1.2

    seconds and standard deviation of 0.6 seconds Unhappy users are here
  5. Query missing indexes select * from db select n+1 deadlock,

    missing/bad cache Resource limits process / thread / connections pool garbage collection / network resource leak / cpu starvation Latency network external api rate limit isolate services
  6. Opensource Nice DSL to emulates real user behaviour Scalable engine

    Great reports/metrics by default C I - able Available “As a Service”
  7. More on the subject https://flood.io/blog/13-stress-testing-jmeter-and-gatling https://flood.io/blog/14-getting-started-with-gatling https://flood.io/blog/27-socket-io-and-websockets-with-gatling http://mestachs.wordpress.com/2012/03/31/performance-when-average-is-not-enough/ http://gatling-tool.org/cheat-sheet/ http://maxdemarzi.com/2013/02/14/neo4j-and-gatling-sitting-in-a-tree-performance-t-e-s-t-ing/

    http://laurent.bristiel.com/getting-started-with-gatling-for-stress-test/ https://github.com/maxdemarzi/neo_permissions/blob/master/performance/src/test/resources/simulations/RandomPermissions.scala#L18 https://github.com/excilys/gatling-hands-on/blob/master/gatling-hands-on-demo/src/test/scala/computerdatabase/Step10.scala https://wiki.jenkins-ci.org/display/JENKINS/Gatling+Plugin http://puppetlabs.com/blog/puppet-gatling-and-jenkins-together http://briancain.herokuapp.com/projects/puppetgatling http://blog.newrelic.com/2013/01/22/understanding-new-relic-queuing/ http://www.webperformance.com/library/tutorials/CalculateNumberOfLoadtestUsers/ http://www.slideshare.net/ZeroTurnaround/stephane-landelleblastyourappwithgatling https://twitter.com/GatlingTool http://blog.roddet.com/2013/06/gatling2-new-inject-api/