gatling
DESCRIPTION
Gatling is Open Source Stress testing tool. Why Gatling: - High Performance. - Multi Threading vs (Akka) Actor Model. - Synchronous Blocking IOs vs asynchronous Non-blocking IOs Netty.TRANSCRIPT
Load Testing with Gatling
Hat’s off for Stephane Landelle
Introduction GatlingDemo
Load testing?
Checking the performance of your application under normal and peak load conditions.
Types of load tests
● Capacity Test● Stress Test
● Endurance Test
Capacity Test
Goal: Determine how much load your system can hold
Stress Test
Goal: Study system behavior in case of heavy load, during AND after
Endurance Test
Goal: Validate system behavior after a long period of activity.
Performance What for?
(from business POV)It’s all ‘bout the money!
Conversion ratesPlatform costs
Results/page : 10 => 30 ➔ +500 ms
➔ -20% pages seen
+100 ms ➔ -1 % sales
➔ Estimated loss: $160M/y
How?
1.Define goals - Requirements2.Analyze - Data - Monitor3.Simulate - Behaviors - Injector4.Iterate!!!
Load testing tool
Jmeter, The Grinder, LoadUI, Tsung, Locust, Load Runner,
Rational, NeoLoad…
Issue #1 High Performance
1 user = 1 thread
50 Threads on a JVM
With 2000 threads
Blocking I/O
Threads? Waiting…
… and sleeping
Can you trust your results ?JMeter2.8 perftest, expecting 300 tr/sec
JMeter reference test with Gatling, expecting 300 tr/sec
Issue #2 Usability
Graphical User Interface
Issue #3 Maintainability
What was this change about?
Synchronous - Asynchronous1user=1 thread - Actor modelBlocking I/O - Non blocking I/O
Be asynchronous, embrace the actor model
Use non-blocking I/O
● Async HTTP Client● Netty
Scenario
= Scala code
= DSL
Demo
Use the rich DSL …Checks
regex / css/ xpath/ jsonPathfind / findAll/ count is / in / not / whatever StructuresdoIf/ repeat / during / asLongAsrandomSwitch/ roundRobinSwitchError handlingtryMax/ exitBlockOnFailFeederscsv/ tsv/ jdbc
or write your own Scala code…
or use the Recorder
Thank You