Performance as a feature - Scale conf

63
10th August 2016 John Clegg at ScaleConf Performance as a Feature The story of the Impossible Mission Force (IMF) Team at Xero

Transcript of Performance as a feature - Scale conf

Page 1: Performance as a feature - Scale conf

10th August 2016John Clegg at ScaleConf

Performance as a Feature

The story of the Impossible Mission Force (IMF) Team at Xero

Page 2: Performance as a feature - Scale conf
Page 3: Performance as a feature - Scale conf

Performance as a Feature

Page 4: Performance as a feature - Scale conf

Performance thinking as a part of dev culture

Page 5: Performance as a feature - Scale conf

The Impossible Mission Force

Page 6: Performance as a feature - Scale conf

Our team’s ultimate goal is to “self destruct”

Page 7: Performance as a feature - Scale conf

Why “Performance as a

Feature” is important?

Page 8: Performance as a feature - Scale conf

Customer satisfaction

Page 9: Performance as a feature - Scale conf

Speed affect conversion rates

Page 10: Performance as a feature - Scale conf

Cost to serveCost to Serve

Page 11: Performance as a feature - Scale conf

Mobile experience

Page 12: Performance as a feature - Scale conf

Why don’t we all do “Performance as a

Feature” ?

Page 13: Performance as a feature - Scale conf

Premature optimisation is EVIL

Premature optimization is the root of all evil

- Donald Knuth (1974)

Page 14: Performance as a feature - Scale conf

The right optimisation is NOT EVIL

“We should forget about small efficiencies, say about 97% of the time: Premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.”

- Donald Knuth (1974)

Page 15: Performance as a feature - Scale conf

We’ll look at performance at the end...

Page 16: Performance as a feature - Scale conf

Functional vs non-functional requirements

Page 17: Performance as a feature - Scale conf

Features Features Features

Page 18: Performance as a feature - Scale conf

We don’t know it’s a problem?

Page 19: Performance as a feature - Scale conf

Product growth

Customers uses of the system gets bigger

Page 20: Performance as a feature - Scale conf

People growth

Page 21: Performance as a feature - Scale conf

How to make “Performance as a

Feature” happen !

Page 22: Performance as a feature - Scale conf

1. Get business buy in2. Get devs to take ownership3. Education + culture

Make “Performance as a Feature” happen!

Page 23: Performance as a feature - Scale conf

Business buy in

Page 24: Performance as a feature - Scale conf

Prove there is a problem

Page 25: Performance as a feature - Scale conf

Quantify investment

Page 26: Performance as a feature - Scale conf

Reduce Risk: Product Spikes

Product Spike● A discovery story used to analyse or

answer a question○ Yes - Further define story and

continue ○ No - Save analysis

● Time-boxed● Quantified against our goals

Page 27: Performance as a feature - Scale conf

Performance is a feature

Page 28: Performance as a feature - Scale conf

Adapt as your product / business grows

Page 29: Performance as a feature - Scale conf

Get devs to take ownership

Page 30: Performance as a feature - Scale conf

Metrics

Page 31: Performance as a feature - Scale conf

How fast are your pages?

Page 32: Performance as a feature - Scale conf

Measure all things

Page 33: Performance as a feature - Scale conf

Understand what metrics are important

Outliers

Page 34: Performance as a feature - Scale conf

Decode metrics for the business

Page 35: Performance as a feature - Scale conf

The “Pain” ratio

Find out what percentage of users will experience a given “percentile” time in a user session

p = percentile

n = Average number of pages per session

1 - (1-p)n

Page 36: Performance as a feature - Scale conf

The “Pain” ratio example

Example Scenario:

Average number of pages per session = 20 pages

95th percentile total page time for your site = 6s

1 - (1-p)n1 - (1 - 0.05)20 = 1 - 0.358 => 64.2

%64% chance that a user will hit a 6s

page

Page 37: Performance as a feature - Scale conf

Get developers theright tools

Page 38: Performance as a feature - Scale conf

What’s going on in my stack?

Page 39: Performance as a feature - Scale conf

Make performance tests easy

Page 40: Performance as a feature - Scale conf

Performance A/B tests

Page 41: Performance as a feature - Scale conf

Continuous testing

Page 42: Performance as a feature - Scale conf

Feature flagging

Page 43: Performance as a feature - Scale conf

Scientist

Page 44: Performance as a feature - Scale conf

Education + Culture

Page 45: Performance as a feature - Scale conf

Training + Workshops

Page 46: Performance as a feature - Scale conf

Performance “Coach”

Page 47: Performance as a feature - Scale conf

Work with the teams

Page 48: Performance as a feature - Scale conf

Carrot + Stick

Page 49: Performance as a feature - Scale conf

What does success look like?

Page 50: Performance as a feature - Scale conf

Teams take ownership

Page 51: Performance as a feature - Scale conf

Added to “Definition of Done”

Page 52: Performance as a feature - Scale conf

Code Quality

Page 53: Performance as a feature - Scale conf

Takeaways

Page 54: Performance as a feature - Scale conf

Enable teams to take ownership

Page 55: Performance as a feature - Scale conf

Enable teams to take ownership

1. Get the right tooling in place2. Own the metrics from the start3. Automate performance testing

Page 56: Performance as a feature - Scale conf

Show business the ROI

Page 57: Performance as a feature - Scale conf

Show business the Return on Investment

1. Prove you have a problem2. Quantify Investment3. Reduce Risk - Spikes

Page 58: Performance as a feature - Scale conf

Education and Training

Page 59: Performance as a feature - Scale conf

Education and Training

1. Make it easy to measure & test2. “Hands on” training3. “Coach” the teams

Page 60: Performance as a feature - Scale conf

IMF team pic

Page 61: Performance as a feature - Scale conf

Resources

MetricsYouTube “How to NOT measure latency” - Gil Tene

YouTube “Fast and Resilient Apps” - Illya Grigorik (Google I/O 16)

Tools“Scientist Measure twice, cut once” - http://githubengineering.com/scientist/

“Feature Toggles” - Martin Fowler - http://martinfowler.com/articles/feature-toggles.html

Page 62: Performance as a feature - Scale conf

Pictures

https://www.flickr.com/photos/christian-dl/3754582699

https://www.youtube.com/watch?v=WhgcDeARanQ

https://www.flickr.com/photos/whatknot/15781706315

https://www.flickr.com/photos/developersteve/28219486931/

https://www.flickr.com/photos/deanhochman/13623115913

https://www.flickr.com/photos/srvega/15140121578/

https://www.flickr.com/photos/jarodcarruthers/8489647601

https://www.flickr.com/photos/87007001@N04/15126712086/

https://www.flickr.com/photos/conalg/17250403565

https://www.flickr.com/photos/99783447@N07/9431062947

https://www.flickr.com/photos/62141688@N08/16645686899/

https://www.flickr.com/photos/thomashawk/45974145

https://www.flickr.com/photos/abeles/1390183044

Page 63: Performance as a feature - Scale conf

Questions