Limits in xkey module usage ?

Dridi Boukelmoune dridi at varni.sh
Tue Sep 25 15:03:04 UTC 2018


> What would be too many objects linked to a single key? To be honest, I don't know. For an answer we'll need to invoke the VMOD authors :)

Keys are just tags, so you could really tag responses in many ways.

For example, on a server delivering contents for multiple hosts, you
could use the normalized host name as a key and decide that any
release on the backend side should invalidate the cache of the
associated host.

Another common example is tagging responses by type, for example add
an "article" key. Once you change your articles template, you have a
way to soft-purge all the cached articles.

No, there are no implicit limits in vmod-xkey. Yes, there are related
limits as pointed out by Carlos, namely number and size of response
headers. vmod-xkey allows criteria-based invalidation like bans (but
not as versatile) at a purge-like scale, and besides the additional
memory footprint it can exhibit contention when the set of purged keys
invalidate too many objects.

I'm afraid I don't have any numbers to share regarding when things go
out of hand. Varnish has a "cutoff" parameter for bans but vmod-xkey
has nothing of the sort to keep everything under tight control.

Dridi

PS. not the vmod-xkey author


More information about the varnish-misc mailing list