85
Web Acceleration and Front End Optimization Cloud Connect 2013 Santa Clara Hooman Beheshti VP Technology, Strangeloop [email protected]

Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

Embed Size (px)

DESCRIPTION

One approach to performance is to accelerate the network; another is to optimize the application by reducing how much the network is needed and pushing content out towards the user. In this session, Hooman Beheshti reveals how technologies like Front-End Optimization and Content Delivery Networks work alongside the rest of the cloud computing stack to improve performance and increase user productivity.

Citation preview

Page 1: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

Web Acceleration and Front End Optimization

Cloud Connect 2013 Santa Clara

Hooman BeheshtiVP Technology, Strangeloop

[email protected]

Page 2: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 2

Web Application Acceleration

• Means lots of things to lots of people– TCP optimization– Caching– HTTP protocol optimization– Compression– Etc

• We’ll focus on “front-end” issues– Front-end Optimization (FEO)– Sometimes called WCO or WPO

Page 3: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 3

Better Performance = Better Business

Page 4: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 4

Page 5: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 5

Impact of page load time on average daily searches per user

50m

s pr

e-he

ader

100m

s pr

e-he

ader

200m

s po

st-he

ader

200m

s po

st-ad

s

400m

s po

st-he

ader

-0.70%

-0.60%

-0.50%

-0.40%

-0.30%

-0.20%

-0.10%

0.00%

Page 6: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 6

Page 7: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 7

Impact of additional delay on business metrics

50 200 500 1000 2000-5.00%-4.50%-4.00%-3.50%-3.00%-2.50%-2.00%-1.50%-1.00%-0.50%0.00%

Queries per visitor Query refinement Revenue per visitorAny clicks Satisfaction

Added delay

Pe

rce

nt

ch

an

ge

Page 8: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 8

Page 9: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 9

Shopzilla had another angle

Big, high-traffic site◦100M impressions a day◦8,000 searches a

second◦20-29M unique visitors

a month◦100M products

16 month re-engineering◦Page load from 6 seconds

to 1.2◦Uptime from 99.65% to

99.97% ◦10% of previous hardware

needs

http://en.oreilly.com/velocity2009/public/schedule/detail/7709

Page 10: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 10

5-12% increase in revenue

Page 11: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 11

Mobile Case Study

Page 12: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 12

Customer Profile

• Top 200 Internet retailer, US based• Target geography: US and Europe• $3B in revenue• 30,000 employees

Page 13: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 13

Page Views by Mobile Device

Page 14: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 14

Experiment

• Induce delay on HTML– 200msec, 500msec, 1000msec

• Apply to small percentage of traffic

• 12 weeks

• Monitor impact on key business metrics

Page 15: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 15

Results

Page 16: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 16

Impact on Bounce Rate

Page 17: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 17

Impact on Returning Visitors

Page 19: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 19

What Is FEO?

Page 20: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 20

What Is FEO?

0 6 12

Page 21: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 21

What Is FEO?

0 6 12

Page 22: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 22

What Is FEO?

0 6 12

DNS TTFB

TCP Connectio

n

Download

Page 23: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 23

What Is FEO?

0 6 12

Back End: The time from when the request is made by the browser to last byte of the HTML response

Front End: Everything after the HTML arrives

Important Timers:

Start Render

onload (Document Complete)

Page 24: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 24

Google’s Waterfall Chart

Page 25: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 25

Measurement/Tools

Page 26: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 26

Waterfall Analysis

• Best way to address front-end problems is to diagnose your site/application through waterfall analysis

Page 27: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 27

Waterfall Tools: webpagetest.org

Page 28: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 28

Waterfall Tools: HTTPWatch

Page 29: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 29

Waterfall Tools: Firebug

Page 30: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 30

Waterfall Tools: WebKit Dev Tools

Page 31: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 31

Waterfall Tools: PCAP2HAR

Page 32: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 32

Measurement – a pretty big deal

• Synthetic performance “proxies”– Backbone testing services– Desktop tools and browser plugins– Browser-based tests– But:

• Not real users• Often no latency/bandwidth limitations imposed on

testing agents

Page 33: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 33

Measurement – a pretty big deal

• Real User Monitoring (RUM)– Using real user beacons– Services available – Can build your own– Now a part of Google Analytics– Caveat: need lots of data!

Page 35: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 35

Front End Problems

Page 36: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 36

Front End Performance Problems

Page 37: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 37

Front End Performance Problems

• Latency: – every round trip incurs a

latency penalty

Page 38: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 38

Front End Performance Problems

• Latency: – every round trip incurs a

latency penalty

• Payload: – last mile bandwidth isn’t

infinite

Page 39: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 39

Front End Performance Problems

• Latency: – every round trip incurs a

latency penalty

• Payload: – last mile bandwidth isn’t

infinite

• Caching: – coming back to the page must

be much faster

Page 40: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 40

Front End Performance Problems

• Latency: – every round trip incurs a

latency penalty

• Payload: – last mile bandwidth isn’t

infinite

• Caching: – coming back to the page must

be much faster

• Rendering: – browser work takes time

Page 41: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 41

Client Platforms

• Desktop vs Mobile– Desktop browsers have more access to

compute resources– Larger screens– Faster networks (lower latency)

• The problems are often similar– Addressing them is often different

Page 42: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 42

Addressing Front End Problems

Page 43: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 43

Latency

• TTFB (Time To First Byte)• Every fetch incurs the latency penalty• Two ways to address the problem:

– Reduce latency– Get rid of round trips

Page 44: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 44

CDN

• Global network of caching proxies that gets content closer to all your users

• The closer the asset, the lower the latency

• CDNs have become a core piece of infrastructure for most modern web sites and services

• Lots of vendors to choose from

Page 45: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 45

CDN

Edge Cache

Edge Cache

Edge Cache

Edge Cache

Origin Data Center

Origin

Page 46: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 46

CDN

• Small object delivery– Only static assets are placed on edge caches– Users go direct to origin to get dynamic content– HTML pages reference objects on the CDN

• Whole Site Delivery (Dynamic Site Acceleration)– All transactions go through CDN, even dynamic

content– More than caching

• Acceleration• Security• Optimization

– More expensiveOrigi

n Da

Page 47: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 47

CDN

Per object TTFB savings of ~50%

Page 48: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 48

CDN: because physics!!

• Well understood way to leverage science

• Mitigates the latency problem by reducing it for the majority of your users

• Less effective when it comes to mobile users

Page 49: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 49

Mobile Networks (3G example)

Page 50: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 50

Resource Consolidation

• Eliminating round trips altogether also fights the latency problem, often more effectively

Combine images into fewer "packages"

Page 51: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 51

Resource Consolidation

• A number of consolidation techniques– Images (sprites)– JavaScript/CSS consolidation/concatenation– Inlining (DataURI for images)– MHTML (IE only)

• Browser makes one request for the “package”

• HTML is marked up so the browser can get individual resources from inside the package

Page 52: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 52

Payload Reduction

• Bytes still need to get from server (cloud or otherwise) to client

• Ways to reduce bytes:– HTTP compression– JS/CSS minification– Image compression (lossless or lossy)

Page 53: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 53

Payload Reduction

• Any reduction in bytes will make pages load faster

• This is particularly important with mobile clients

Page 54: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 54

Browser Caching

• The browser cache is a resource seldom used optimally

• Reasons why we generally don’t do good browser caching– Caching rules are often complicated– We never want to server stale content

Page 55: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 55

Browser Caching

• Use long expiry on static objects– Served from origin– Served from CDN

• Invalidation framework is a must– Protect against serving stale content– Example: versioning

/images/image.jpg /images/image.jpg?v=00001

Page 56: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 56

Browser Caching on Mobile Platforms

• Different than desktop

• The cache available to the browsers is relatively small

• Use HTML5’s localStorage instead of browser cache– A programmable cache, unlike HTTP object

caches– Limited size (~2.5MB per domain)– Good for caching CSS/JS, and small images

Page 57: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 57

Rendering Issues

• More complicated

• The order of events in the browser makes a difference to how fast a page looks– Put things in the optimal order for rendering

• Deferral– CSS and JS (sometimes images)

• Not at the expense of a page’s start render

– Asynchronous JavaScript

• 3rd party services have an impact on page rendering

• Above the fold vs below the fold

Page 58: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 58

“The HTML Problem”

Page 59: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 59

Performance Pain: The HTML Problem

• HTML base pages are often generated after the server runs some business logic

• This is typically observed as “server think time”, which affects time to first byte

Page 60: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 60

Performance Pain: The HTML Problem

• HTML base pages are often generated after the server runs some business logic

• This is typically observed as “server think time”, which affects time to first byte

TTFB = Latency + Server think time

Page 61: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 61

Performance Pain: The HTML Problem

• HTML base pages are often generated after the server runs some business logic

• This is typically observed as “server think time”, which affects time to first byte

TTFB = Latency + Server think time

BLOCKED

Page 62: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 62

Performance Pain: The HTML Problem

• HTML base pages are often generated after the server runs some business logic

• This is typically observed as “server think time”, which affects time to first byte

• Not always logic related: could be caused by issues within the cloud infrastructure itself

• HTML is often seen as dynamic

• Cannot be cached, anywhere in the network

TTFB = Latency + Server think time

BLOCKED

Page 63: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 63

HTML Caching

• Some level of caching for HTML is generally a good idea

• This is especially true if HTML isn’t truly dynamic and is static for small periods of time

• Great for server offload

• Solutions that allow granular caching of HTML

Page 64: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 64

Some Examples

Page 65: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 65

Before and After Waterfalls

58 roundtrips 5 roundtrips4.2 seconds 1.1 seconds

57 roundtrips 4 roundtrips3.2 seconds 0.7 seconds

First Time Visitor

Repeat Visitor

Before FEO After FEO

Page 66: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 66

Cloud Connect Home Page

Page 67: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 67

Cloud Connect Home Page

5.63 sec

2.8 sec

Page 68: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 68

Cloud Connect Home Page

FEO

5.63 sec

2.8 sec

Page 69: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 69

Cloud Connect Home Page

FEO

To onload Before After

Round Trips 122 58

KBytes 1024 8955.63 sec

2.8 sec

Page 70: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 70

Cloud Connect Home Page

FEO

5.63 sec

3.64 sec

To onload Before After

Round Trips 122 58

KBytes 1024 895

2.8 sec

1.8sec

Start Render: +36%Doc Complete: +35.5%

Page 71: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 71

What Does it Look Like?

http://youtu.be/uszBaW5yMI0

Page 72: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 72

Mobile Example

• Velocity Conference 2012

• Step-wise acceleration of O’reilly’s site (for a mobile phone on 3G)– Start with the original site (purposely made

worse)– Add CDN– Add resource consolidation and payload

reduction– Add deferrals

• Examine impact of each

Page 73: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 73

What Does it Look Like?

http://youtu.be/iPtbU1KvLjM

Page 74: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 74

Original Site + CDN

15.29 sec 13.7 sec

Page 75: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 75

Add Consolidation and Payload Reduction

13.7 sec

9.47 sec

To onload Before After

# of resources 92 28

KBytes 727 417

Page 76: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 76

Add Deferral

Page 77: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 77

Add Deferral

Page 78: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 78

Add Deferral

9.47 sec

3.6 sec

5.56 sec

2.2 sec

Page 79: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 79

What Does it Look Like?

http://youtu.be/zTTxdAtbhsg

Page 80: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 80

Summing up…

Page 81: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 81

Sounds Really Easy!

• It’s not!

• Some techniques are just difficult to implement

• Optimizing for performance sometimes requires significant dev resources– Mortal companies can’t afford to sacrifice new

feature cycles

• Maintenance and upkeep is a constant problem– Every version to roll out will need optimization

Page 82: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 82

FEO Automation Industry

• Solutions available to automatically do this stuff

• Multiple deployment options– Software/Hardware/Service– Cloud apps will use either service or software

• The goal is to “fix the code” for performance, automatically

Page 83: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 83

It Gets Complicated

• Rewriting HTML can break pages

• You have to do this stuff based on browser– Play to the strength of each browser (supported

techniques, etc)– Stay away from their weaknesses (bugs,

undocumented issues, etc)– Mobile is its own beast

• Optimizing once per page isn’t enough– First view (cold cache)– Repeat view (warm cache)– User flow

Page 84: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

© 2010 Strangeloop Networks Strangeloop. Faster Websites. Automatically. 84

When Looking For FEO Automation

• Do your research, and understand your needs

• Understand the deployment model and how disruptive it will be to you, if at all

• Are there provisions in place for breaking pages

• Granularity in functionality:– Browser-based optimization– mobile– first/repeat views– transaction flows

• Choose what’s right for you, based on your needs

Page 85: Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (Hooman Beheshti)

Thank You

85

[email protected]