Serve stale content if backend is down.
This commit is contained in:
@@ -140,23 +140,16 @@
|
||||
backend default {
|
||||
.host = "100.64.229.126";
|
||||
.port = "10080";
|
||||
.probe = {
|
||||
.url = "/";
|
||||
.timeout = 1s;
|
||||
.interval = 5s;
|
||||
.window = 5;
|
||||
.threshold = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub vcl_backend_response {
|
||||
# default TTL if backend didn't specify one
|
||||
if (beresp.ttl <= 0s) {
|
||||
set beresp.ttl = 1h;
|
||||
}
|
||||
# serve stale content in case home link is down
|
||||
set beresp.grace = 240h;
|
||||
}
|
||||
sub vcl_backend_response {
|
||||
# default TTL if backend didn't specify one
|
||||
if (beresp.ttl <= 0s) {
|
||||
set beresp.ttl = 1h;
|
||||
}
|
||||
# serve stale content in case home link is down
|
||||
set beresp.grace = 240h;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user