Changes in Varnish 6.4.0¶
For information about updating your current Varnish deployment to the new version, see Upgrading to Varnish 6.4.0.
A more detailed and technical account of changes in Varnish, with links to issues that have been fixed and pull requests that have been merged, may be found in the change log.
varnishd¶
bugs¶
Numerous bugs have been fixed.
Generic Parameter Handling¶
Some parameters have dependencies and those are better documented now. For example thread_pool_min can’t be increased above thread_pool_max, which is now indicated as such in the manual.
On a running Varnish instance the param.show command will display the
actual minimum or maximum, but an attempt to param.set a parameter above
or below its dynamic maximum or minimum will mention the failure’s cause in
the error message:
varnish> param.show thread_pool_reserve
200
thread_pool_reserve
        Value is: 0 [threads] (default)
        Maximum is: 95
        [...]
varnish> param.show thread_pool_min
200
thread_pool_min
        Value is: 100 [threads] (default)
        Maximum is: 5000
        [...]
varnish> param.set thread_pool_reserve 100
106
Must be no more than 95 (95% of thread_pool_min)
(attempting to set param 'thread_pool_reserve' to '100')
Expect further improvements in future releases.
Parameters¶
- Raised the minimum for the vcl_cooldown parameter to 1 second.
Changes in behavior¶
- The if-rangeheader is now handled, allowing clients to conditionally request a range based on a date or an ETag.
- Output VCC warnings also for VCLs loaded via the varnishd -foption
Changes to VCL¶
- New syntax for “no backend”: - backend dummy none; sub vcl_recv { set req.backend_hint = dummy; } - It can be used whenever a backend is needed for syntactical reasons. The - nonebackend will fail any attempt to use it. The other purpose is to avoid the declaration of a dummy backend when one is not needed: for example an active VCL only passing requests to other VCLs with the- return (vcl(...))syntax or setups relying on dynamic backends from a VMOD.
- std.rollback(bereq)is now safe to use, see VMOD std - Varnish Standard Module for details.
- Deliberately closing backend requests through - return(abandon),- return(fail)or- return(error)is no longer accounted as a fetch failure.
- Numerical expressions can now be negative or negated as in - set resp.http.ok = -std.integer("-200");.
- The - +=operator is now available for headers and response bodies:- set resp.http.header += "string"; 
VCL variables¶
- Add more vcl control over timeouts with the sess.timeout_linger,sess.send_timeoutandsess.idle_send_timeoutvariables corresponding the parameters by the same names.
VMODs¶
- Imported VMOD cookie - Varnish Cookie Module from varnish_modules - The previously deprecated function - cookie.filter_except()has been removed during import. It was replaced by- cookie.keep()
varnishlog¶
- A NoticeVSL tag has been added.
- Log records can safely have empty fields or fields containing blanks
if they are delimited by “double quotes”. This was applied to
SessErrorandBackend_health.
varnishadm¶
- New pidcommand in the Varnish CLI, to get the master and optionally cache process PIDs, for example fromvarnishadm.
varnishstat¶
- Add vi-style CTRL-f / CTRL-b for page down/up to interactive
varnishstat.
- The MAIN.sess_dropcounter is gone.
- Added rx_close_idlecounter for separate accounting whensess.timeout_idle/ timeout_idle is reached.
- sess.send_timeout/ send_timeout being reached is no longer reported as- MAIN.sc_rem_close, but as- MAIN.sc_tx_error.
Changes for developers and VMOD authors¶
General¶
- New configure switch: --with-unwind. Alpine linux appears to offer alibexecinfoimplementation that crashes when called by Varnish, this offers the alternative of usinglibunwindinstead.
- The option varnishtest -Wis gone, the same can be achieved withvarnishtest -p debug=+witness. Awitness.shscript is available in the source tree to generate a graphviz dot file and detect potential lock cycles from the test logs.
- Introduced struct reqtopto hold information on the ESI top request andPRIV_TOP.
- New or improved Coccinelle semantic patches that may be useful for VMOD or utilities authors.
- Added VSLs()andVSLbs()functions for loggingSTRANDSto VSL.
- Added WS_VSB_new()/WS_VSB_finish()for VSBs on workspaces.
- added v_dont_optimizeattribute macro to instruct compilers (only gcc as of this release) to not optimize a function.
- Added VSB_tofile()tolibvarnishapi.
VMODs¶
- It is now possible for VMOD authors to customize the connection pooling of a dynamic backend. A hash is now computed to determine uniqueness and a backend declaration can contribute arbitrary data to influence the pool.
- VRB_Iterate()signature has changed.
- VRT_fail()now also works from director code.
- body_statusand- req_body_statushave been collapsed into one type. In particular, the- REQ_BODY_*enums now have been replaced with- BS_*.
- Added VRT_AllocStrandsWS()as a utility function to allocate STRANDS on a workspace.
eof