Created
October 9, 2012 20:49
-
-
Save heddn/3861321 to your computer and use it in GitHub Desktop.
Backend definitions for servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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