Slide 1

Slide 1 text

testing for capacity for

Slide 2

Slide 2 text

Sergey Vysotskiy [email protected]

Slide 3

Slide 3 text

3ELEMENTS OF PERFORMANCE

Slide 4

Slide 4 text

Client

Slide 5

Slide 5 text

Internet Weather Client

Slide 6

Slide 6 text

Internet Weather Client Your Pretty Servers

Slide 7

Slide 7 text

NEXT 30 MINUTES: HOW TO COUNT SERVERS

Slide 8

Slide 8 text

NEXT 30 MINUTES: HOW TO COUNT SERVERS GOAL INFLUENCE ON TESTS

Slide 9

Slide 9 text

NEXT 30 MINUTES: HOW TO COUNT SERVERS GOAL INFLUENCE ON TESTS ENVIRONMENT INFLUENCE ON TESTS

Slide 10

Slide 10 text

NEXT 30 MINUTES: HOW TO COUNT SERVERS GOAL INFLUENCE ON TESTS ENVIRONMENT INFLUENCE ON TESTS SHINY TOOLS WE LIKE

Slide 11

Slide 11 text

ENVIRONMENT ENVIRONMENT https://www.flickr.com/photos/gcwest/6575768243/

Slide 12

Slide 12 text

Monolithic

Slide 13

Slide 13 text

Micro Services Monolithic

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

100+ Services

Slide 17

Slide 17 text

100+ Services Frequent Changes

Slide 18

Slide 18 text

100+ Services Frequent Changes Simplify!

Slide 19

Slide 19 text

Simplify!

Slide 20

Slide 20 text

Math (pv2/2)+p=const Do the

Slide 21

Slide 21 text

There’s exceptions

Slide 22

Slide 22 text

Weird exceptions

Slide 23

Slide 23 text

MOCK all the things

Slide 24

Slide 24 text

Mock should be FAST

Slide 25

Slide 25 text

Mock should be FLEXIBLE

Slide 26

Slide 26 text

DO THE DECOMPOSITION If problem looks really hard

Slide 27

Slide 27 text

ENVIRONMENT IMPACT ON TESTS https://www.flickr.com/photos/coofdy/12989245854/

Slide 28

Slide 28 text

What do we test for? CAPACITY!

Slide 29

Slide 29 text

We need System limits UX limits Time To Restore

Slide 30

Slide 30 text

Test LESS

Slide 31

Slide 31 text

Test LESS

Slide 32

Slide 32 text

Test LESS

Slide 33

Slide 33 text

Test LESS

Slide 34

Slide 34 text

Test LESS

Slide 35

Slide 35 text

VIRTUAL USERS Let’s define tests with

Slide 36

Slide 36 text

VIRTUAL USERS Remember decomposition?

Slide 37

Slide 37 text

THE ONLY THING THAT SERVER KNOW REQUEST DISTRIBUTION

Slide 38

Slide 38 text

THE ONLY THING THAT SERVER KNOW CONNECTIONS NUMBER

Slide 39

Slide 39 text

HIT-BASED MODEL Such wow! Very rescue!

Slide 40

Slide 40 text

10% of A 40% of B 50 % of C 10000 RPS

Slide 41

Slide 41 text

10% of A 40% of B 50 % of C 10000 RPS Test data

Slide 42

Slide 42 text

10% of A 40% of B 50 % of C 10000 RPS Test itself

Slide 43

Slide 43 text

Input data: Monitoring

Slide 44

Slide 44 text

Input data: Experience

Slide 45

Slide 45 text

WHY HIT-BASED MODEL IS AWESOME? 3 reasons

Slide 46

Slide 46 text

1. Easy to analyze.

Slide 47

Slide 47 text

2. Easy to change.

Slide 48

Slide 48 text

3. Easy to plan with.

Slide 49

Slide 49 text

SMALL SECRET* *Don’t try with stateful protocols.

Slide 50

Slide 50 text

SMALL SECRET* *Still works for stateful applications.

Slide 51

Slide 51 text

HIT-BASED MODEL Such wow! Very rescue!

Slide 52

Slide 52 text

ENVIRONMENT TOOLS https://www.flickr.com/photos/ebarney/3348965637/

Slide 53

Slide 53 text

IN-HOUSETools Protocols

Slide 54

Slide 54 text

IN-HOUSETools Protocols HTTP

Slide 55

Slide 55 text

JMeter: designed for VU

Slide 56

Slide 56 text

JMeter: OK with plugins

Slide 57

Slide 57 text

JMeter: wow RPS shaping

Slide 58

Slide 58 text

JMeter: preformance :-(

Slide 59

Slide 59 text

Yandex.Tank: some history

Slide 60

Slide 60 text

address=203.0.113.1 port=80 rps_schedule=const(10, 10m) header_http = 1.1 headers = [Host: www.target.example.com] [Connection: close] ammofile=/tmp/access.log ammo_type=access

Slide 61

Slide 61 text

address=203.0.113.1 port=80 rps_schedule=const(10, 10m) header_http = 1.1 headers = [Host: www.target.example.com] [Connection: close] ammofile=/tmp/access.log ammo_type=access

Slide 62

Slide 62 text

address=203.0.113.1 port=80 rps_schedule=const(10, 10m) header_http = 1.1 headers = [Host: www.target.example.com] [Connection: close] ammofile=/tmp/access.log ammo_type=access

Slide 63

Slide 63 text

address=203.0.113.1 port=80 rps_schedule=const(10, 10m) header_http = 1.1 headers = [Host: www.target.example.com] [Connection: close] ammofile=/tmp/access.log ammo_type=access

Slide 64

Slide 64 text

address=203.0.113.1 port=80 rps_schedule=const(10, 10m) header_http = 1.1 headers = [Host: www.target.example.com] [Connection: close] ammofile=/tmp/access.log ammo_type=access

Slide 65

Slide 65 text

address=203.0.113.1 port=80 rps_schedule=const(10, 10m) header_http = 1.1 headers = [Host: www.target.example.com] [Connection: close] uris = / /lekjfvnieoqr?fvjgr=werb245

Slide 66

Slide 66 text

Yandex.Tank: in action

Slide 67

Slide 67 text

RAW DATA + R/PANDAS/WHATEVER

Slide 68

Slide 68 text

Yandex.Tank: built-in reports

Slide 69

Slide 69 text

Yandex.Tank: built-in reports

Slide 70

Slide 70 text

Production Monitoring if it’s good enough

Slide 71

Slide 71 text

Automate all the things!

Slide 72

Slide 72 text

Target LoadGen Monitoring Report Jenkins

Slide 73

Slide 73 text

Sergey Vysotskiy [email protected] Thanks! https://www.flickr.com/photos/30389420@N08/15073997375/