life on the edge with esi

52
Life on the Edge with ESI Kit Chan([email protected]) Yahoo!

Upload: lydia

Post on 11-Jan-2016

36 views

Category:

Documents


0 download

DESCRIPTION

Life on the Edge with ESI. Kit Chan( [email protected] ) Yahoo!. Life on the Edge. Source: http://img.shockblast.net/2012/01/ShockBlast-4-803109.jpg. Agenda. Introduction Use Cases Performance Characteristics Future Q&A. Agenda. Introduction Use Cases Performance Characteristics - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Life on the Edge with ESI

Life on the Edge with ESIKit Chan([email protected])

Yahoo!

Page 2: Life on the Edge with ESI
Page 3: Life on the Edge with ESI
Page 4: Life on the Edge with ESI
Page 5: Life on the Edge with ESI

Life on the Edge

Source: http://img.shockblast.net/2012/01/ShockBlast-4-803109.jpg

Page 6: Life on the Edge with ESI

Agenda

Introduction Use Cases Performance Characteristics Future Q&A

Page 7: Life on the Edge with ESI

Agenda

Introduction Use Cases Performance Characteristics Future Q&A

Page 8: Life on the Edge with ESI

Edge Computing/CDN Source: http://www.excitingip.com/wp-content/uploads/2011/01/contentdeliverynetworkblockdiagram.jpeg

Page 9: Life on the Edge with ESI

CDN in Yahoo!

- Pages: avg 30.2 Gbps send, 28.48 Gbps recv, 20.2% cache ratio

- Assets: avg 38.7 Gbps send, 4.1 Gbps recv. 96.7% cache hit ratio

User Location Latency - 100K file in US Through Y! Edge

California, USA 0.2s 0.02s

Singapore 2s 0.02s

Korea 1.3s 0.02s

Ireland 1.2s 0.2s

Switzerland 1.0s 0.2s

Page 10: Life on the Edge with ESI

Edge Computing in Yahoo!

- Pages: avg 30.2 Gbps send, 28.48 Gbps recv, 20.2% cache ratio

- Assets: avg 38.7 Gbps send, 4.1 Gbps recv. 96.7% cache hit ratio

User Location Latency - 100K file in US Through Y! Edge

California, USA 0.2s 0.02s

Singapore 2s 0.02s

Korea 1.3s 0.02s

Ireland 1.2s 0.2s

Switzerland 1.0s 0.2s

Page 11: Life on the Edge with ESI

ESI – Edge Side Includes

Page 12: Life on the Edge with ESI

Syntax Example

Markup in Response

<esi:include src=http://xyz.com/content.html/>

Page 13: Life on the Edge with ESI

Syntax Example

Can handle response error and timeout

<esi:try><esi:attempt>

<esi:include src=http://xyz.com/content.html/ >

</esi:attempt><esi:except>

Sorry there is an error!

</esi:except></esi:try>

Page 14: Life on the Edge with ESI

ESI Support in Proxy Server – Proven & Popular

Page 15: Life on the Edge with ESI

ESI Support in CDN Vendor

Page 16: Life on the Edge with ESI

Agenda

Introduction Use Cases Performance Characteristics Future Q&A

Page 17: Life on the Edge with ESI

Use Case 1 – Content Assembly

Page 18: Life on the Edge with ESI

Use Case 1 – Content Assembly

Page 19: Life on the Edge with ESI

Use Case 1 – Content Assembly

Page 20: Life on the Edge with ESI

Use Case 1 - Content Assembly

Page 21: Life on the Edge with ESI

Why? Performance!No server cache + No ESI

Server cache + No ESI

ATS Cache + ESI modules

ScenarioOrigin Server Handling Full Page requests each time and executing every module every time.

Origin Server handling full page requests, only executing non cacheable modules

Origin Server only serving requests for non cacheable modules

FE throughput per box

45 queries per second

140 queries per second

190 queries per second

Server latency 900 ms per request 80 ms per page 55 ms per page

Page 22: Life on the Edge with ESI

Why? Availability

Why it goes down?

- Releases

- OutageHow ESI Help?

- Template cached

- Fallback for each ESI module

Page 23: Life on the Edge with ESI

Why? Legacy Module Support

Page 24: Life on the Edge with ESI

Use Case 2 – Combo Handler

Allow us to fetch multiple JS/CSS in one HTTP requestE.g. http://l.yimg.com/zz/combo?d/1.js&d/2.js

- It combines http://l.yimg.com/d/1.js and http://l.yimg.com/d/2.js into one response in the server and returns one response

Minimize HTTP requests from browser to increase performance

Page 25: Life on the Edge with ESI

Combo Handler Sequence Diagram

Page 26: Life on the Edge with ESI

Sample ESI Doc from Combo URL Decode Service<esi:try><esi:attempt>

<esi:include src=http://l.yimg.com/d/1.js/>

</esi:attempt><esi:except>

/* error fetching 1.js */

</esi:except></esi:try>

<esi:try><esi:attempt>

<esi:include src=http://l.yimg.com/d/2.js/ >

</esi:attempt><esi:except>

/* error fetching 2.js */

</esi:except></esi:try>

Page 27: Life on the Edge with ESI

Why? ATS with ESI Plugin

- Provide sophisticated features for HTTP resource caching

- Provide other features such as timeout, collapse forwarding for request

- Provide capability of fetching contents simultaneously and assembling them together

Page 28: Life on the Edge with ESI

Use Case 3 - Timely Launch

Page 29: Life on the Edge with ESI

Before Launch

Page 30: Life on the Edge with ESI

After Launch

Page 31: Life on the Edge with ESI

Timely Launch – Before Launch

Page 32: Life on the Edge with ESI

Timely Launch – Before Launch

Page 33: Life on the Edge with ESI

Timely Launch – After Launch

Page 34: Life on the Edge with ESI

Timely Launch – After Launch

Page 35: Life on the Edge with ESI

Usage Pattern

ClientProxy

Server/CDN

ESI Service

Origin Server for ESI Include

Page 36: Life on the Edge with ESI

Agenda

Introduction Use Cases Performance Characteristics Future Q&A

Page 37: Life on the Edge with ESI

Concurrent Requests

Page 38: Life on the Edge with ESI

First Byte Flush

Page 39: Life on the Edge with ESI

ESI Support in Varnish

No concurrent requests for includesFirst Byte Flush Support

Page 40: Life on the Edge with ESI

ESI Support in Apache Traffic Server

Concurrent requests for includesFirst Byte Flush Support*

Page 41: Life on the Edge with ESI

Agenda

Introduction Use Cases Performance Characteristics Future Q&A

Page 42: Life on the Edge with ESI

History

The spec (ESI 1.0) is published over 10 years ago.

- W3C spec

- Editor - Mark Nottingham from Akamai

Mark Nottinghamhttp://www.mnot.net/

Page 43: Life on the Edge with ESI

Future – Deep HTTP Integration

ClientProxy Server Supporting

ESI

Origin Server returing ESI Document

Origin Server for ESI Include

Page 44: Life on the Edge with ESI

Future – Deep HTTP Integration

ClientProxy Server Supporting

ESI

Origin Server returing ESI Document

Origin Server for ESI Include

Final response header to user cannot be changed

Page 45: Life on the Edge with ESI

Future – Deep HTTP Integration

ClientProxy Server Supporting

ESI

Origin Server returing ESI Document

Origin Server for ESI Include

Final response header to user can be changed

Request Header, method, timeout cannot be changed for includes

Page 46: Life on the Edge with ESI

Future – Deep HTTP Integration

ClientProxy Server Supporting

ESI

Origin Server returing ESI Document

Origin Server for ESI Include

Request/Response Header cannot be retrieved as variables

Final response header to user can be changed

Request Header, method, timeout can be changed for includes

Page 47: Life on the Edge with ESI

Future – Smart Assembly

One request for multiple includes (e.g. one Ad call fetching multiple ad position)

Page 48: Life on the Edge with ESI

Future – More Use cases

Device DetectionBucket Testing

http://illusionmedia.com/wp-content/uploads/2012/03/mobileDevices1-300x200.jpg

https://doazrm3qeh7n2.cloudfront.net/images/features/quick-a-vs-b-testing.jpg

Page 49: Life on the Edge with ESI

Agenda

Introduction Use Cases Performance Characteristics Future Q&A

Page 50: Life on the Edge with ESI

Q & A

Thank [email protected]

Page 51: Life on the Edge with ESI

Reference ESI Language Specification – http://www.w3.org/TR/esi-lang

Edge Architecture Specification - http://www.w3.org/TR/edge-arch

ATS ESI plugin - https://github.com/apache/trafficserver/blob/master/plugins/experimental/esi/README

Varnish ESI - https://www.varnish-cache.org/docs/3.0/tutorial/esi.html

Akamai ESI - http://www.akamai.com/dl/technical_publications/akamai_esi_extensions.pdf

F5 - http://support.f5.com/kb/en-us/products/wa/manuals/product/wa9_4policy/WA_Policy_9_4-19-1.html

Page 52: Life on the Edge with ESI

Extra: Moving to the Real Edge? – the Clients Problem with SEO

Performance - More HTTP requests between clients and edge servers