Hello guys, before opening a ticket, i just need a tiny help in check where i am doing this wrong.
I have a fastly service with several backends.
For a specific path i change the timeout values as following :
sub vcl_recv {
#FASTLY recv
if (req.http.Host == "dataservice-preprod.company.com"
&& req.url ~ "^/slow/request") {
set req.http.X-Long-Timeout = "true";
set req.http.Fastly-No-Shield = "1";
set req.backend = F_dataservice;
return(pass);
}
# some other domain matching to route to specific backends.
}
sub vcl_pass {
#FASTLY pass
if (req.http.X-Long-Timeout == "true") {
set bereq.first_byte_timeout = 600s;
set bereq.between_bytes_timeout = 600s;
set req.http.X-Passed = "true";
}
}
sub vcl_miss {
#FASTLY miss
if (req.http.X-Long-Timeout == "true") {
set bereq.first_byte_timeout = 600s;
set bereq.between_bytes_timeout = 600s;
set req.http.X-Missed = "true";
}
}
sub vcl_deliver {
#FASTLY deliver
if (req.http.X-Long-Timeout == “true”) {
set resp.http.X-Slow-Endpoint = “true”;
set resp.http.X-Missed = req.http.X-Missed;
set resp.http.X-Passed = req.http.X-Passed;
}
}
When making a request to the matching path, i can see the header X-Passed in the response headers, so my guess is the timeouts are configured.
However they all end up with the default 15s timeout.
I thought about creating a new backend with its own timeouts (with the same origin), where i would route these specific requests, but seem a bit overkill
What is done wrong ? ![]()