Multiple backends for same host with varying timeouts

Simon Males sime at
Thu Apr 21 07:54:27 CEST 2011


I'm interested to hear what is considered best practice in terms of
setting different timeouts for different URLs.

Example: /reports take a long while to generate and much longer then
the default first/between_bytes_timeouts run time parameters. In my
(simple) mind, a second reporting backend can be specified to the same
host with a custom timeout parameter. A simple vcl example below:

backend default {
    .host = "";
    .port = "8080";

backend reports {
    .host = "";
    .port = "8080";
    .first_byte_timeout = 300s;

sub vcl_recv {
  if (req.url ~ "^/reports") {
    set req.backend = reports;

On the right track?

Out of interest does varnish consider these two backends completely separate?

Simon Males

More information about the varnish-misc mailing list