konfigurasi di apanya nih bro, jika backendnya lg berat juga muncul guru meditation, yg jd pertanyaan klo buat handle domain dan vbulletin selalu gagal, tp klo subdomain varnishnya jalan. ato saya pm kan settingan vcl saya? gmna bro? barangkali ada yg salah.
backend 01 {
.host = "ip-backend 01";
.port = "80";
.connect_timeout = 30s;
.first_byte_timeout = 360s;
.between_bytes_timeout = 60s;
.max_connections = 220;
.probe = {
.url = "/";
.interval = 30s;
.timeout = 10s;
.window = 5;
.threshold = 3;
}
}
backend 02 {
.host = "ip-backend 02";
.port = "80";
.connect_timeout = 30s;
.first_byte_timeout = 360s;
.between_bytes_timeout = 60s;
.max_connections = 220;
.probe = {
.url = "/";
.interval = 30s;
.timeout = 10s;
.window = 5;
.threshold = 3;
}
}
director baz round-robin {
{ .backend = backend01; }
{ .backend = backend02; }
}
sub vcl_recv {
set req.backend = baz;
if (req.http.cookie && req.http.cookie ~ "auth_user") {
return (pass);
}
}
sub vcl_hash {
if (req.http.cookie && req.http.cookie ~ "auth_user") { set req.hash += "auth"; }
set req.hash += req.url;
return(hash);
}
sub vcl_error {
#if (obj.status == 503 && req.restarts < 4) {
#restart;
if (obj.status == 503) {
set obj.http.Location = "http://www.xxx.com";
set obj.status = 302;
return(deliver);
}
}