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

[email protected]
|
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/>
_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to