Use varnish-cache in front of HLS servers for live streaming

Guillaume Quintard guillaume at
Thu Jun 10 16:18:22 UTC 2021


By default, Varnish only hashes the host and URL (including the query

So you possibly need to clean the query string.

Or, while unlikely, it could be that your backend is returning a Vary
header, in which case, you should remove the request headers corresponding
to this (ignore content-encoding though)

Guillaume Quintard

On Thu, Jun 10, 2021 at 3:54 AM Hamidreza Hosseini <hrhosseini at>

> Hi,
> I want to use varnish as a cache server in front of my Http live streaming
> servers to serves .ts files to client and I want to ignore caching .m3u8
> files extension to be cached.
> When I read how varnish would cache the objects again, I encountered with
> some issues for example because each clients would request the .ts files
> from varnish directly or through load balancers  (load balancer would pass
> all headers to varnish) so for unique .ts file , varnish will cache the
> file for each client! so I should normalize header or delete some clients
> header or somehow I should tell varnish that this file is unique and dont
> cache it again based on different useless header...
> How can I tell this to varnish or which header should be deleted by
> varnish because I don't know which client would send which header !
> which header would affect on double caching?
> Is there any sample config to satisfy my needs?
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list