13. 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>
21. Why? Performance!
No server cache +
No ESI
Server cache + No
ESI
ATS Cache + ESI
modules
Scenario
Origin 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
22. Why? Availability
Why it goes down?
- Releases
- Outage
How ESI Help?
- Template cached
- Fallback for each ESI module
24. Use Case 2 – Combo Handler
Allow us to fetch multiple JS/CSS in one HTTP request
E.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
26. 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>
27. 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
42. History
The spec (ESI 1.0) is published over 10 years ago.
- W3C spec
- Editor - Mark Nottingham from Akamai
Mark Nottingham
http://www.mnot.net/
43. Future – Deep HTTP Integration
Client
Proxy Server
Supporting
ESI
Origin Server
returing ESI
Document
Origin Server
for ESI Include
44. Future – Deep HTTP Integration
Client
Proxy Server
Supporting
ESI
Origin Server
returing ESI
Document
Origin Server
for ESI Include
Final response
header to user
cannot be changed
45. Future – Deep HTTP Integration
Client
Proxy 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
46. Future – Deep HTTP Integration
Client
Proxy 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
47. Future – Smart Assembly
One request for multiple
includes (e.g. one Ad call
fetching multiple ad position)
48. Future – More Use cases
Device Detection
Bucket Testing
http://illusionmedia.com/wp-content/uploads/2012/03/mobileDevices1-300x200.jpg
https://doazrm3qeh7n2.cloudfront.net/images/features/quick-a-vs-b-testing.jpg