Skip to content

Instantly share code, notes, and snippets.

@heddn
Created October 9, 2012 20:49
Show Gist options
  • Save heddn/3861321 to your computer and use it in GitHub Desktop.
Save heddn/3861321 to your computer and use it in GitHub Desktop.
Backend definitions for servers
# https://www.varnish-cache.org/trac/wiki/LoadBalancing
backend server1 {
.host = "localhost";
.port = "8080";
.first_byte_timeout = 300s;
.connect_timeout = 300s;
.between_bytes_timeout = 300s;
# http://www.lullabot.com/articles/varnish-multiple-web-servers-drupal for status.php
.probe = { .url = "/status.php"; .interval = 15s; .timeout = 5s; .window = 8;.threshold = 3; }
}
# Define the director that determines how to distribute incoming requests.
director default_director round-robin {
{ .backend = server1; }
}
sub vcl_recv {
set req.backend = default_director;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment