gatling

37
Load Testing with Gatling

Upload: swapnil-kotwal

Post on 18-Jun-2015

274 views

Category:

Technology


7 download

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

Page 1: Gatling

Load Testing with Gatling

Page 2: Gatling

Hat’s off for Stephane Landelle

Page 3: Gatling

Introduction GatlingDemo

Page 4: Gatling

Load testing?

Checking the performance of your application under normal and peak load conditions.

Page 5: Gatling

Types of load tests

● Capacity Test● Stress Test

● Endurance Test

Page 6: Gatling

Capacity Test

Goal: Determine how much load your system can hold

Page 7: Gatling

Stress Test

Goal: Study system behavior in case of heavy load, during AND after

Page 8: Gatling

Endurance Test

Goal: Validate system behavior after a long period of activity.

Page 9: Gatling

Performance What for?

(from business POV)It’s all ‘bout the money!

Conversion ratesPlatform costs

Page 10: Gatling

Results/page : 10 => 30 ➔ +500 ms

➔ -20% pages seen

Page 11: Gatling

+100 ms ➔ -1 % sales

➔ Estimated loss: $160M/y

Page 12: Gatling

How?

1.Define goals - Requirements2.Analyze - Data - Monitor3.Simulate - Behaviors - Injector4.Iterate!!!

Page 13: Gatling
Page 14: Gatling

Load testing tool

Jmeter, The Grinder, LoadUI, Tsung, Locust, Load Runner,

Rational, NeoLoad…

Page 15: Gatling

Issue #1 High Performance

Page 16: Gatling

1 user = 1 thread

Page 17: Gatling

50 Threads on a JVM

Page 18: Gatling

With 2000 threads

Page 19: Gatling

Blocking I/O

Page 20: Gatling

Threads? Waiting…

Page 21: Gatling

… and sleeping

Page 22: Gatling

Can you trust your results ?JMeter2.8 perftest, expecting 300 tr/sec

Page 23: Gatling

JMeter reference test with Gatling, expecting 300 tr/sec

Page 24: Gatling

Issue #2 Usability

Page 25: Gatling

Graphical User Interface

Page 26: Gatling

Issue #3 Maintainability

Page 27: Gatling

What was this change about?

Page 28: Gatling

Synchronous - Asynchronous1user=1 thread - Actor modelBlocking I/O - Non blocking I/O

Page 29: Gatling

Be asynchronous, embrace the actor model

Page 30: Gatling

Use non-blocking I/O

● Async HTTP Client● Netty

Page 31: Gatling

Scenario

= Scala code

= DSL

Page 32: Gatling

Demo

Page 33: Gatling

Use the rich DSL …Checks

regex / css/ xpath/ jsonPathfind / findAll/ count is / in / not / whatever StructuresdoIf/ repeat / during / asLongAsrandomSwitch/ roundRobinSwitchError handlingtryMax/ exitBlockOnFailFeederscsv/ tsv/ jdbc

Page 34: Gatling

or write your own Scala code…

Page 35: Gatling

or use the Recorder

Page 36: Gatling

References

http://gatling.iohttps://github.com/gatling

Page 37: Gatling

Thank You