can third-party scripts take down your entire site?

66
Can Third-Party Scripts Take Down Your Entire Site? Tammy Everts O’Reilly Webcast – June 4, 2014

Upload: radware

Post on 20-Aug-2015

4.199 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Can Third-Party Scripts Take Down Your Entire Site?

Can Third-Party Scripts Take Down Your Entire Site?

Tammy Everts

O’Reilly Webcast – June 4, 2014

Page 2: Can Third-Party Scripts Take Down Your Entire Site?

Conversions

Ad revenue

Page views

Visitor data

No need to re-invent the wheel

Quick and easy

Established

Support

Slide 2

Page 3: Can Third-Party Scripts Take Down Your Entire Site?

Third-party calls can make up >50% of page requests.

Slide 3

Steve Souders: http://www.fastly.com/blog/steve-souders-webperf-web-components/

Page 4: Can Third-Party Scripts Take Down Your Entire Site?

Slide 4

Page 5: Can Third-Party Scripts Take Down Your Entire Site?

Slide 5

Page 6: Can Third-Party Scripts Take Down Your Entire Site?

Slide 6

Page 7: Can Third-Party Scripts Take Down Your Entire Site?

Third-party scripts present risks to your pages and to your users:

Outages

Slowdowns

Security (?)

Slide 7

Page 8: Can Third-Party Scripts Take Down Your Entire Site?

Slide 8

Page 9: Can Third-Party Scripts Take Down Your Entire Site?

Slide 9

Page 10: Can Third-Party Scripts Take Down Your Entire Site?

Increase page weight

Increase number of hosts and connections

Introduce additional latency

Slide 10

Page 11: Can Third-Party Scripts Take Down Your Entire Site?

Slide 11

832ms 1.788s 918ms

Page 12: Can Third-Party Scripts Take Down Your Entire Site?

Wait… what the heck is a fourth-party call?

Slide 12

Page 14: Can Third-Party Scripts Take Down Your Entire Site?

Slide 14

Page 15: Can Third-Party Scripts Take Down Your Entire Site?

1. Audit your third-party scripts.

Page 16: Can Third-Party Scripts Take Down Your Entire Site?

• Identify all third-party scripts

• Know which pages they’re on

• Find out what performance best practices, if any, each script uses (e.g., deferral, async loading)

• Read the SLA for each provider (if they have one)

Slide 16

Page 17: Can Third-Party Scripts Take Down Your Entire Site?

Slide 17

http://www.webpagetest.org

Page 18: Can Third-Party Scripts Take Down Your Entire Site?

Slide 18

Page 19: Can Third-Party Scripts Take Down Your Entire Site?

http://www.webperformancetoday.com/2014/03/18/waterfalls-101-how-to-use-a-waterfall-chart-to-diagnose-performance-pains/

Slide 19

Page 20: Can Third-Party Scripts Take Down Your Entire Site?

Slide 20

Page 21: Can Third-Party Scripts Take Down Your Entire Site?

Slide 21

Page 22: Can Third-Party Scripts Take Down Your Entire Site?

2. Test for SPOFs.

Page 23: Can Third-Party Scripts Take Down Your Entire Site?

The old, painful way:

http://www.webperformancetoday.com/2011/10/13/how-vulnerable-is-your-site-to-third-party-failure/

Slide 23

Page 25: Can Third-Party Scripts Take Down Your Entire Site?

Slide 25

Page 26: Can Third-Party Scripts Take Down Your Entire Site?

Slide 26

Page 27: Can Third-Party Scripts Take Down Your Entire Site?

Slide 27

Page 28: Can Third-Party Scripts Take Down Your Entire Site?

Slide 28

SPOF: 22.7s

Original: 3.5s

Page 29: Can Third-Party Scripts Take Down Your Entire Site?

Slide 29

Page 30: Can Third-Party Scripts Take Down Your Entire Site?

Slide 30

Page 31: Can Third-Party Scripts Take Down Your Entire Site?

Slide 31

Page 32: Can Third-Party Scripts Take Down Your Entire Site?

Slide 32

Page 33: Can Third-Party Scripts Take Down Your Entire Site?

Slide 33

Original

SPOF

Page 34: Can Third-Party Scripts Take Down Your Entire Site?

https://www.optimizely.com/security

Slide 34

Page 35: Can Third-Party Scripts Take Down Your Entire Site?

Slide 35

Page 36: Can Third-Party Scripts Take Down Your Entire Site?

Slide 36

Page 37: Can Third-Party Scripts Take Down Your Entire Site?

Slide 37

Original

SPOF

Page 38: Can Third-Party Scripts Take Down Your Entire Site?

Blackhole test results fall into one of three groups:

1. SPOF page loads SLOWER than original page Fix: Deferral or async script

2. SPOF page loads FASTER than original page Fix: Talk to provider about script hosting

3. SPOF page times out. Fix: Same as #1

Slide 38

Page 39: Can Third-Party Scripts Take Down Your Entire Site?

3. Before you add a new script, research the provider.

Page 40: Can Third-Party Scripts Take Down Your Entire Site?

• Response time and time to last byte

• RT and TTLB from multiple locations

• Average monthly downtime

• Do they use a CDN?

• If so, where are their caches located?

Slide 40

Page 41: Can Third-Party Scripts Take Down Your Entire Site?

4. Read the provider’s service level agreement.

Page 42: Can Third-Party Scripts Take Down Your Entire Site?

An ideal third-party SLA should:

• Express monthly annual uptime guarantee as a percentage (ideally, as close to 100% as possible)

• Explain how performance will be monitored and reported

• Describe the process for reimbursing site owners (if site owners are paying for the service provided by the script) if uptime drops below the SLA guarantee

Slide 42

Page 43: Can Third-Party Scripts Take Down Your Entire Site?

5. Perform a cost-benefit analysis.

Page 44: Can Third-Party Scripts Take Down Your Entire Site?

Slide 44

Page 45: Can Third-Party Scripts Take Down Your Entire Site?

Slide 45

Page 46: Can Third-Party Scripts Take Down Your Entire Site?

2-second slowdown = 14% conversion loss

But…

…if that same tool promises a 20% conversion increase, that = a net gain of 6%

Slide 46

Page 47: Can Third-Party Scripts Take Down Your Entire Site?

6. Be ready to say no.

Page 48: Can Third-Party Scripts Take Down Your Entire Site?

Slide 48

Page 49: Can Third-Party Scripts Take Down Your Entire Site?

7. Defer scripts whenever possible.

Page 50: Can Third-Party Scripts Take Down Your Entire Site?

Slide 50

Page 51: Can Third-Party Scripts Take Down Your Entire Site?

Pro: It’s a relatively easy fix.

Con: It won’t work for all content.

Slide 51

Page 52: Can Third-Party Scripts Take Down Your Entire Site?

Slide 52

Page 53: Can Third-Party Scripts Take Down Your Entire Site?

8. Use asynchronous scripts.

Page 54: Can Third-Party Scripts Take Down Your Entire Site?

Slide 54

Page 55: Can Third-Party Scripts Take Down Your Entire Site?

Slide 55

Page 56: Can Third-Party Scripts Take Down Your Entire Site?

Slide 56

Pro:

Doesn’t block primary content.

Cons:

Can be tricky to program.

Can mess up onLoad and make it difficult

to see other problems.

Page 59: Can Third-Party Scripts Take Down Your Entire Site?

9. Monitor constantly.

Page 60: Can Third-Party Scripts Take Down Your Entire Site?

RUM/APM

Tag management systems

SPOF-o-matic

No excuses.

Slide 60

Page 61: Can Third-Party Scripts Take Down Your Entire Site?

10. Give feedback to providers.

Page 62: Can Third-Party Scripts Take Down Your Entire Site?

Slide 62

Page 63: Can Third-Party Scripts Take Down Your Entire Site?

Slide 63

Page 64: Can Third-Party Scripts Take Down Your Entire Site?

11. Know when to pull the plug.

Page 65: Can Third-Party Scripts Take Down Your Entire Site?

Slide 65

Page 66: Can Third-Party Scripts Take Down Your Entire Site?

Tammy Everts

[email protected]

webperformancetoday.com

twitter.com/tameverts

Slide 66

Questions?