Question: is it possible to load balance rtsp servers using Varnish? They'd need to "stick" based on client ip. My thought was to try something like this:<div><br></div><div><br></div><div><div>backend mobile-1 {</div>
<div> .host = "";</div><div> include "/usr/local/varnish/etc/varnish/backend.vcl";</div><div>}</div><div><br></div><div>backend mobile-2 {</div><div> .host = "";</div><div> include "/usr/local/varnish/etc/varnish/backend.vcl";</div>
<div>}</div><div><br></div><div>backend mobile-3 {</div><div> .host = "";</div><div> include "/usr/local/varnish/etc/varnish/backend.vcl";</div><div>}</div><div><br></div><div>backend mobile-4 {</div>
<div> .host = "";</div><div> include "/usr/local/varnish/etc/varnish/backend.vcl";</div><div>}</div><div><br></div><div>director mobile_rtsp client {</div><div> { .backend = mobile-1; }</div><div> { .backend = mobile-2; }</div>
<div> { .backend = mobile-3; }</div><div> { .backend = mobile-4; }</div><div>}</div><div><br></div><div>sub vcl_recv {</div><div> set req.backend = mobile_rtsp;</div><div> set client.identity = client.ip;</div><div> return (pipe);</div>
<div>}</div><div><br></div><div>sub vcl_pipe {</div><div> # close backend connection after each pipe - this prevents requests from stepping on each other</div><div> # <a href="http://www.varnish-cache.org/trac/wiki/VCLExamplePipe">http://www.varnish-cache.org/trac/wiki/VCLExamplePipe</a></div>
<div> set bereq.http.connection = "close";</div><div>}</div></div><div><br></div><div><br></div><div>Thanks,</div><div>Nicholas</div><div><br><div><div> <span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<div><br><table style="border-top:1px dashed rgb(204, 204, 204);border-bottom:1px dashed rgb(204, 204, 204);width:585px" cellpadding="5" width="100%"><tbody><tr><td><div style="font-family:'Lucida Grande',Verdana,Arial,sans-serif;font-size:9px;color:rgb(153, 153, 153);line-height:9pt">
<div style="float:left"><strong style="color:rgb(255, 0, 0)">Nicholas Tang</strong><strong style="color:rgb(85, 85, 85);margin-left:3px;margin-right:3px">:</strong></div><div style="float:left;font-weight:bold;color:rgb(85, 85, 85);margin-right:3px">
VP, Dev Ops<br></div><br><div style="float:left;margin-right:5px"><a href="mailto:nicholas.tang@livestream.com" title="Email me" style="color:rgb(153, 153, 153);text-decoration:none" target="_blank">nicholas.tang@livestream.com</a></div>
<div style="float:left;font-weight:bold;color:rgb(204, 204, 204);margin-right:5px">|</div><div style="float:left;margin-right:5px">t: +1 (646) 495 9707</div><div style="float:left;font-weight:bold;color:rgb(204, 204, 204);margin-right:5px">
|</div><div style="float:left;margin-right:5px">m: +1 (347) 410 6066<br></div><div style="float:left;font-weight:bold;color:rgb(204, 204, 204);margin-right:3px">|</div><div style="float:left">111 8th Avenue, Floor 15, New York, NY 10011</div>
</div></td><td style="width:100px" width="100px"><a href="http://www.livestream.com/" title="Visit livestream.com" target="_blank"><img src="http://livestream-email.s3.amazonaws.com/signatures/ls-logo-100x25.jpg" alt="www.livestream.com" border="0" height="25" width="100"></a></td>
</tr></tbody></table></div></div></span></div></span></div></span> </div><br>
</div></div>