Load balancing streaming (rtsp) servers
Nicholas Tang
nicholas.tang at livestream.com
Wed Dec 29 23:59:15 CET 2010
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:
backend mobile-1 {
.host = "";
include "/usr/local/varnish/etc/varnish/backend.vcl";
}
backend mobile-2 {
.host = "";
include "/usr/local/varnish/etc/varnish/backend.vcl";
}
backend mobile-3 {
.host = "";
include "/usr/local/varnish/etc/varnish/backend.vcl";
}
backend mobile-4 {
.host = "";
include "/usr/local/varnish/etc/varnish/backend.vcl";
}
director mobile_rtsp client {
{ .backend = mobile-1; }
{ .backend = mobile-2; }
{ .backend = mobile-3; }
{ .backend = mobile-4; }
}
sub vcl_recv {
set req.backend = mobile_rtsp;
set client.identity = client.ip;
return (pipe);
}
sub vcl_pipe {
# close backend connection after each pipe - this prevents requests from
stepping on each other
# http://www.varnish-cache.org/trac/wiki/VCLExamplePipe
set bereq.http.connection = "close";
}
Thanks,
Nicholas
*Nicholas Tang**:*
VP, Dev Ops
nicholas.tang at livestream.com
|
t: +1 (646) 495 9707
|
m: +1 (347) 410 6066
|
111 8th Avenue, Floor 15, New York, NY 10011
[image: www.livestream.com] <http://www.livestream.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101229/b9354177/attachment.html>
More information about the varnish-misc
mailing list