What is ESI ?
ESI (Edge Side Includes) is a system which allows content assembly by a web accelerator (Akamai, F5, Varnish, Squid ...). If you are familiar with the concept of SSI with Apache then you will quickly become familiar with ESI as the concept is more or less the same.
What problem does ESI solve ?
How does ESI work ?
Well, that is quite simple. By using a bunch of specific tags your web accelerator will process them, insert the result in the HTML page and will finally service it to the client. Let's take an example with the <esi:include [...]/> :
- the webserver will return an HTML page with a tag <esi:include src="http://path/to/something" [...]/>
- the web accelerator will parse the HTML, find the <esi:include [...]/> tag
- the web accelerator will call the URL defined in the src attribute and insert the result in the HTML page where the <esi:include [...]/> tag has been defined of course
- the web accelerator will service the final page to the client.
Where can I get ESI support ?
ESI is supported by vendors such as Akamai and F5 but the requirement here is to get ready to sign a (big) check ;). ESI is also supported by free open source softwares such as Varnish and Squid. However this is not because it is supported by these vendors/softwares that the specification is fully supported. The only vendor I know who support the specification completely is Akamai (F5 as well ? If you know other vendors who support ESI completely, please let me know). Squid and Varnish have only a very limited support of the language.
So what can I do with it ?
If you plan to use the <esi:include [...]/> tag only then you can use Varnish but you have to know it has a very limited support of this tag and will ignore errors silently. If you plan to use more than <esi:include [...]/> then you do not have much choice, you have to use vendors like Akamai and this costs money. Sometimes it makes sense to sign a check to get a quick solution "now" if "now" is definitely important to you. However you have to take the long run into account as well. Using a feature which is not completely supported by different vendors/softwares introduces the risk of being locked with a specific vendor/software. Conclusion ----------
I personally see ESI an numeric equivalent to cigarettes. So it is better for your health not to taste. Use ESI only if this is the very last solution you can use.