22. Why? Performance!
No server cache +
No ESI
Server cache + No
ESI
YTS 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
23. Why? Availability
Why it goes down?
- Releases
- Outage
How ESI Help?
- Template cached
- Fallback for each ESI module
25. Use Case 2 - Automatic Fallback
“Always On” - 100% availability for “existing” pages
Serve static pages when origin servers are down or
too slow
No change needed on origin servers
47. Future
The spec (ESI 1.0) is published over 10 years ago.
- W3C spec
- Editor - Mark Nottingham from Akamai
Mark Nottingham
http://www.mnot.net/
48. Future – Manipulating Requests/Responses
Client
Proxy Server
Supporting
ESI
Origin Server
returing ESI
Document
Origin Server
for ESI Include
49. Future – Manipulating Requests/Responses
Client
Proxy Server
Supporting
ESI
Origin Server
returing ESI
Document
Origin Server
for ESI Include
Final response
header to user can
be changed
50. Future – Manipulating Requests/Responses
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 can
be changed for
includes
51. Future – Manipulating Requests/Responses
Client
Proxy Server
Supporting
ESI
Origin Server
returing ESI
Document
Origin Server
for ESI Include
Request/Response
Header can be
retrieved as variables
Final response
header to user can
be changed
Request Header,
method, timeout can
be changed for
includes
52. Future – Smart Assembly
One request for multiple
includes (e.g. one Ad call
fetching multiple ad position)
53. 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
56. 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
Editor's Notes
Abstract -Web sites and applications are starting to decouple and separate functionality and services from the frontend web server and more often push them to be handled by servers at the edge of the internet. This idea is commonly known as Edge Computing and it is a hot trend right now. Content caching and request routing are among some of the common tasks being pushed to the edge. As the trend continues, it is evident that we need to introduce various other processing capabilities at the edge in order to support more use cases. One of the more discussed ways of doing so is to support Edge Side Include (ESI). It is a simple markup language that provides content assembly at the edge level.In Yahoo!, we used ESI extensively in high trafficked media properties such as News, Lifestyle and Entertainments. This talk will share our experiences working with ESI. We will start with simple use case of content assembly and get the audience familiar with the embarrassingly simple and tiny templating language right away. You will get the hang of it within a minute. Then we will present a couple of our more innovative ESI use cases at large scale (e.g. Building a CSS/JS combo handler using ESI, Automatically cache static version of your page in edge cache and serving them instead of the dynamic version when your frontend server is not responding) and show the audience its great potentials. We will also share with you the current support of it among HTTP proxy software (such as Apache Traffic Server and Varnish) and vendors (e.g. Akamai). Finally we will discuss about its current limitations and shortcomings and hopefully revive people interests in this specification as well as working towards a version 2.0