Consider default_grace=0 with Varnish
dridi opened this issue · 9 comments
Currently the wiki says:
VCL isn't modified, beyond setting up a
backend
. The service port is set in the Systemd service file, and it is started with-p default_ttl=0
.
Consider also adding -p default_grace=0
to squash some false-negatives like "Shared HTTP cache must prefer Cache-Control: s-maxage over a longer Cache-Control: max-age" that Varnish supports.
Also if you want to run the built-in VCL and only set a backend, you can use the varnishd -b <addr:port>
option instead of -f <path/to/vcl>
to get the same result without involving a VCL file.
Grace mode triggers s-maxage
handling? That's... weird. Will give it a try, thanks.
Not really, just like default_ttl
pretends there was a max-age
or s-maxage
when omitted by the backend response, default_grace
does the same for stale-while-revalidate
. And with a default value of 10s it breaks the assumptions of some tests.
I ended up having to do -p default_ttl=0 -p default_grace=0 -p default_keep=3600
; lots of fixed tests. Thanks!
I was planning to look at further test once the ones hindered by the default default_grace
would be solved, but thanks for taking the time to look at the manual and figuring default_keep
on your own.
Looking at the remaining tests, it's not obvious to me why some of them are failing. How can I run the test suite myself?
There seems to be instructions for that, don't mind me I should be fine by myself.
Cool. Note that I'm testing 5.2.1, as that's the latest packaged on Arch (strangely, not sure what the story is there).
I was able to run the test suite but many tests failed, more than half of them. So many that I don't have the time now to troubleshoot anything now. I will revisit this later and open a new ticket eventually.
Thanks again!
Happy to help diagnose what's happening if you like. I've just improved the CLI's dumping of requests and responses for individual test runs (with --id=xxx
), FWIW.