SlideShare a Scribd company logo
Ready, Steady, Crash!
Katie Koschland
Engineer, Financial Times
@KKoschland
Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019
Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019
Embarrassed
@KKoschland
Could my users be having a
similar experience? ¯_(ツ)_/¯
@KKoschland
Hello
@KKoschland
I work at the
I am going to talk about my
load testing journey.
@KKoschland
I will aim to cover the core
concepts behind load
testing.
@KKoschland
1. The Challenge
2. Getting started
3. Identify performance issue
4. Troubleshooting
5. Outcomes
@KKoschland
The Challenge
@KKoschland
@KKoschland
Testing the technical limits
of our node application.
@KKoschland
3 Questions
@KKoschland
Will our application crash?
@KKoschland
If so, can our application
recover?
@KKoschland
What happens to the user
experience?
@KKoschland
@KKoschland
I was told the answers
could be found by load
testing.
@KKoschland
So, what exactly is
load testing ?
@KKoschland
@KKoschland
“It is about simulating
ordinary user activity
and then applying
stress until it reaches
failure.”
@Jadware
How can I apply this so
called ‘stress’ to my
application?
@KKoschland
Choose a
Testing framework
@KKoschland
There are many frameworks
out there.
@KKoschland
@KKoschland
I decided to go with Artillery.
@KKoschland
5 Reasons
@KKoschland
@KKoschland
Allows you to customise JS
code within your scripts.
@KKoschland
@KKoschland
Scripts could be configured
using YAML.
@KKoschland
@KKoschland
Targeted towards
continuous integration.
@KKoschland
Provides detailed metrics.
@KKoschland
Decide on the type
of requests.
@KKoschland
Scripts need to be able to
represent ordinary user
activity.
@KKoschland
@KKoschland
Decide on the shape
of load.
@KKoschland
@KKoschland
You may already know the
shape of load.
@KKoschland
Before the
release of a push
notification.
@KKoschland
@KKoschland
But it’s also okay if you don’t
know...
@KKoschland
You can split the script into
four separate phases.
@KKoschland
Warm Up
Arrival rate of 10 virtual
users/second for 60
seconds.
@KKoschland
Ramp up
Arrival rate of 10 to 25 new
virtual users/second for 120
seconds.
@KKoschland
Cruise
Arrival rate of 25 virtual
users/second for 1200
seconds.
@KKoschland
Crash
Arrival rate of 100 virtual
users/second for 30
seconds.
@KKoschland
@KKoschland
@KKoschland
Shape of load hitting FT.com
homepage
warm up ramp up Cruise
Crash
1. The challenge
2. Getting started
3. Identify performance issue
4. Troubleshooting
5. Outcomes
@KKoschland
What should the
first script look like?
@KKoschland
The script is split into two
sections.
@KKoschland
Config Section
@KKoschland
@KKoschland
@KKoschland
@KKoschland
@KKoschland
Scenario Section
@KKoschland
@KKoschland
@KKoschland
@KKoschland
Ready to go!
@KKoschland
@KKoschland
Cool, now what?
@KKoschland
Artillery will provide you with a
summary report which
contains detailed metrics.
@KKoschland
@KKoschland
@KKoschland
@KKoschland
@KKoschland
@KKoschland
@KKoschland
1. The Challenge
2. Getting started
3. Identify performance issue
4. Troubleshooting
5. Outcomes
@KKoschland
@KKoschland
We had
identified a
serious
performance
issue.
@KKoschland
1. The Challenge
2. Getting started
3. Identify performance issue
4. Troubleshooting
5. Outcomes
@KKoschland
How do we find
the culprit?
@KKoschland
@KKoschland
@KKoschland
Application issue?
@KKoschland
Generate a flamegraph
@KKoschland
@KKoschland
@KKoschland
Neo4j Driver?
@KKoschland
@KKoschland
@KKoschland
Increased the pool size,
decreased the retry timeout.
@KKoschland
Parameterized the cypher query
@KKoschland
Cypher tuning?
@KKoschland
@KKoschland
@KKoschland
@KKoschland
@KKoschland
Configuration
issue with db?
@KKoschland
@KKoschland
@KKoschland
So, what was the
fix?
@KKoschland
@KKoschland
So, why have I shared this
example with you?
@KKoschland
Build a
personal
toolbox.
@KKoschland
1. The Challenge
2. Getting started
3. Identify performance issue
4. Troubleshooting
5. Outcomes
@KKoschland
Outcomes
@KKoschland
Able to measure, assess
and improve the overall
performance of our
application.
@KKoschland
Able to assess the
reliability of our application.
@KKoschland
To fully understand the
performance and reliability
of what you’re building, you
should all be load testing
your application.
@KKoschland
Thanks
@KKoschland
We’re hiring!
Visit ft.com/dev/null
@KKoschland

More Related Content

Katie Koschland - Ready, steady, crash - Codemotion Amsterdam 2019