<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 06/10/2014 03:07 AM, Hernán Marsili
wrote:<br>
</div>
<blockquote
cite="mid:CABEj_0rtLU0rrTHPqLyFt6K_k=3LnpZc_8TU0iGD=E=BRoYN0A@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div>
<div>
<div dir="ltr">
<div>
<div><span style="font-size:12px"></span></div>
</div>
<div><span style="font-size:12px">
<address><span
style="font-size:small;font-style:normal"><span
style="font-family:Arial,Verdana,sans-serif;font-size:12px"></span></span></address>
</span></div>
</div>
</div>
</div>
<div>We are working on a VIDEO SITE for a sports sites.
Currently working with Varnish 3.0.5. The average video size
is 100mb. We have a 4gb malloc storage. </div>
<div><br>
</div>
<div>Right now, we are handling mp4 as just a regular file. No
problems so far. A couple of questions:</div>
<div><br>
</div>
<div>1) STREAM. We tried this on the vcl but we don't see much
improvement. Should we use it anyway?</div>
<div><br>
</div>
<div>
<p style="margin:0px;font-size:11px;font-family:Menlo"> if
(req.url ~ "\.mp4") {</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">
set beresp.do_<b>stream</b> = true;</p>
<p style="margin:0px;font-size:11px;font-family:Menlo">
set beresp.http.X-Cacheable-TTL = "stream";<br>
</p>
<p style="margin:0px;font-size:11px;font-family:Menlo"> }</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br>
</p>
<p style="margin:0px;min-height:13px"><span
style="font-family:arial;font-size:small">1) VARNISH
STREAM BRANCH. We find a all branch of varnish for
streaming. </span><span
style="font-family:arial;font-size:small"><a
moz-do-not-send="true"
href="https://github.com/mbgrydeland/varnish-cache-streaming">https://github.com/mbgrydeland/varnish-cache-streaming</a>.
Does anyway knows if this is now part of Varnish 3.0.5 or
Varnish 4?</span><font face="Menlo"><span
style="font-size:11px"> </span></font></p>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
You may have two problems: <br>
- the fact that your file is being downloaded, meaning that only the
client who triggered the backend request will profit from the
streaming. This is solved in v4, and data will be send as soon as
available, for all threads.<br>
- the video metadata is at the end of the file, meaning that your
clients must retrieve all the file before starting to read. You're
probably in this case if the video takes a long time to read, even
if cached.<br>
<br>
To mitigate the second problem, you may use qt-faststart
(<a class="moz-txt-link-freetext" href="https://github.com/danielgtaylor/qtfaststart">https://github.com/danielgtaylor/qtfaststart</a>) to move the meta data
at the beginning of the file, or switch to a chunked protocol.<br>
<br>
(hopefully, if per-request vmods calls come to fruition, or the vfp
mature a bit more, we'll have a vmod to qt-faststartify files on the
fly).<br>
<br>
Hope that helps.<br>
<br>
<pre class="moz-signature" cols="72">--
Guillaume Quintard</pre>
</body>
</html>