varnish / docker-varnish

Official docker image
https://hub.docker.com/_/varnish
82 stars 34 forks source link

Varnish with slash #71

Closed piyush96arora1 closed 9 months ago

piyush96arora1 commented 9 months ago

I am using varnish cache with slash storage engine

This might not be an issue: I am running varnish in a docker container with varnishd command in a custom entry point as chown vcache. /data/varnish_storage.bin /usr/sbin/varnishd -E /usr/lib/varnish/vmods/libvmod_slash.so -F -s fast=fellow,/data/varnish_storage.bin,1G,500M,2M -f /etc/varnish/default.vcl -a 0.0.0.0:6081 This creates a varnish_storage.bin file whose size is around 1GB Now lets say i have to increase the storage. Is there any way i could preserve my old cache? as currently it would involve rebuild the docker as the command is in entrypoint and restart the docker. And as soon as i restart it creates a new storage file. How could i increase storage to 2GB while preserving old storage?

gquintard commented 9 months ago

Hello @piyush96arora1,

There are three points to consider here here:

I'll close this issue as I don't think there's a bug or anything to fix, but I'm happy to continue de discussion here or on discord

piyush96arora1 commented 9 months ago

Thanks for prompt reply. @gquintard Actually my run command is docker run --privileged -d --restart always -v /data/etc/varnish:/etc/varnish -v /data/etc/logs:/logs -v /data/etc/storage:/data --network host

So already the storage file is at the host system, but the point is the file at the start takes the space mentioned in varnishd command. So i can preserve the storage file before a restart but there would be no point in copying the old file in the storage directory as a restart would create new storage file with updated size. Not getting a reply from the vmod's maintainer on this point. Could you try it at your end. It would be really helpful

gquintard commented 9 months ago

He's usually pretty responsive on IRC and on the varnish-misc mailing-list, can you try there? I don't have much more access to him than you do :-|

piyush96arora1 commented 9 months ago

He's usually pretty responsive on IRC and on the varnish-misc mailing-list, can you try there? I don't have much more access to him than you do :-|

Didn't got you: What is IRC? And any specific mail which u r refering to?

gquintard commented 9 months ago

Here you go, that should clarify it: https://varnish-cache.org/support/index.html