Mailing List Archive

Varnish could build an Etag based on all collected Etags from the backend
When using Varnish in conjunction with ESis no one but Varnish could build
a global Etag that really summarizes the response send to the client.

I am wondering if Varnish could build a global Etag based on all Etags
received from the backend.
I understand that creating this Etag from multiple chunks(ESIs) is cpu
intensive and thus I am wondering if Varnish could build this Etag based on
all ESI Etags received, instead of doing it from the body/html in itself

Jordi
Re: Varnish could build an Etag based on all collected Etags from the backend [ In reply to ]
On Wed, Nov 30, 2016 at 10:22 AM, Jordi Llach <jllach@agilecontents.com> wrote:
> When using Varnish in conjunction with ESis no one but Varnish could build a
> global Etag that really summarizes the response send to the client.
>
> I am wondering if Varnish could build a global Etag based on all Etags
> received from the backend.
> I understand that creating this Etag from multiple chunks(ESIs) is cpu
> intensive and thus I am wondering if Varnish could build this Etag based on
> all ESI Etags received, instead of doing it from the body/html in itself

Short answer is no, the game is over before you get to the response
headers of ESI sub-requests.

Dridi

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish could build an Etag based on all collected Etags from the backend [ In reply to ]
From my ignorance sounds strange as the final response is a composition of
multiple sub-requests, which in turn are cached individually.
Thanks for the feedback

2016-11-30 10:53 GMT+01:00 Dridi Boukelmoune <dridi@varni.sh>:

> On Wed, Nov 30, 2016 at 10:22 AM, Jordi Llach <jllach@agilecontents.com>
> wrote:
> > When using Varnish in conjunction with ESis no one but Varnish could
> build a
> > global Etag that really summarizes the response send to the client.
> >
> > I am wondering if Varnish could build a global Etag based on all Etags
> > received from the backend.
> > I understand that creating this Etag from multiple chunks(ESIs) is cpu
> > intensive and thus I am wondering if Varnish could build this Etag based
> on
> > all ESI Etags received, instead of doing it from the body/html in itself
>
> Short answer is no, the game is over before you get to the response
> headers of ESI sub-requests.
>
> Dridi
>
Re: Varnish could build an Etag based on all collected Etags from the backend [ In reply to ]
On Wed, Nov 30, 2016 at 3:40 PM, Jordi Llach <jllach@agilecontents.com> wrote:
> From my ignorance sounds strange as the final response is a composition of
> multiple sub-requests, which in turn are cached individually.
> Thanks for the feedback

I know, but this not an area of Varnish where I'm much knowledgeable
so I'll stick to the short answer...

It's basically the same problem as collecting Set-Cookie headers from
sub-requests to add them in the top response. That's not possible
unfortunately.

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish could build an Etag based on all collected Etags from the backend [ In reply to ]
On Wed, Nov 30, 2016 at 03:40:03PM +0100, Jordi Llach wrote:
> From my ignorance sounds strange as the final response is a composition of
> multiple sub-requests, which in turn are cached individually.

But the response body isn't rendered until after the headers have already been
sent. So varnish doesn't know about the full list of ESI includes until after
the body is sent.

--
Andreas

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc