Easyshop icon indicating copy to clipboard operation
Easyshop copied to clipboard

Add Edge Side Includes (ESI) for the shopping cart portlet, thus allowing varnish to aggressively cache shop

Open ned14 opened this issue 14 years ago • 0 comments

http://code.google.com/p/easyshop-for-plone/issues/detail?id=42

Reported by nialldouglas14, Mar 22, 2010 I found a VERY interesting use of TAL at http://jorgenmodin.net/index_html/archive/2010/03/01/how-to-use-edge-side-includes-esi--with-varnish-in-plone to encapsulate ESI into Plone output in a fashion which makes use of varnish if present, but still works if varnish isn't present.

Because Easyshop must maintain a session instance per browsing customer, it makes caching site content a pain and creates a severe performance bottleneck and forces a high watermark for simultanous users. The general solution here is to employ ESI to demarcate those parts of a page which are specific to this user (typically the shopping cart portlet) and which are common to all (in our case everything else, but with special attention paid to item stock quantities which must always be in real time). You then have varnish serve all common content from cache and have it mux in the stuff which is per-user just before it is served.

This cannot solve load caused by a logged in user as currently Plone is fairly braindead in optimising this. But it can help greatly before a user creates an account.

ned14 avatar Jun 27 '10 12:06 ned14