New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage clarification #43
Comments
it's fine. While, as a https://github.com/varnishcache/varnish-cache/ developer in the main project I strictly endorse use of github issues for actual bugs only, for this vmod (as for most of our others found on https://gitlab.com/uplex/varnish ) we do not provide the usual community support (mailing-list/forum/...), so using issues for questions is fine for me in this case. Regarding k8s, I'd like to place an ad here: we are still looking for additional sponsors for https://gitlab.com/uplex/varnish/k8s-ingress |
one final word: in varnish-cache we still have not solved the director reference issue, see varnishcache/varnish-cache#2072. |
Honestly, I was trying to find a way to leverage the dynamic nature of the vmod to allow me to add and remove backends to a live config (to react to servers spinning up & down). But I would need to add them to a pool, which is currently either the shard director or the round-robin director. I've been reading more into it and it looks like external creation & validation of VCL and then loading with Just as an aside, will I need to call |
add/remove backend are intended for use with a running vcl. |
Sorry to keep pulling this thread, but how would I use them with a running vcl? Can they be called interactively, or is this just something I would utilise in the logic of my vcl (eg. based on a custom Is there perhaps another medium for these kind of discussions (As I realise I've really derailed the issue now)? |
I'm being terse because I need to prep and pack for my holidays, sorry. You should be able to add/remove backends from anywhere in vcl, yes, not just vcl_init. As long as this a core varnish question (which it is), the options are in http://varnish-cache.org/support/index.html |
Thanks for your time. I didn't realise there was an IRC channel, and I'll continue this in there. All the best with your holidays! |
Hey!
First of all, I want to apologise for posting this as I think it may be a bit outside the realm of what you expect in an issue, but I was hoping you could help clarify usage of the this director. Secondly, thanks for providing this, as all of my searches for similar functionality have been dead ends (Varnish 3, varnish-plus). I'm pretty new to Varnish as a whole, and looking to use it in a dynamic Kubernetes environment.
Basically, I'm just trying to understand at what I need to facilitate the usage of this director and the limitations. As an overview, my current setup that I'm toying with is a layer of Varnish servers using the shard director to load-balance caching, and a backend 'content' layer (Nginx) for the actual content to be cached.
From my understanding of the man page..
sub vcl_init
sub vcl_recv
I basically add any kind of routing logic (eg. based onreq.http.host
) nothing out of the ordinary so farset req.backend_hint = content.backend("mybackend");
which declares my (dns)resolved backend.Does this mean that I cannot now leverage a load-balanced director (as the dynamic director must resolve a hostname), and in turn must use another load-balancing service for my content nodes (ideally. with a hostname that can be resolved by this director). This obviously contrasts from the current setup of my director declaring all 4 or so backends and load-balancing, vs. the dynamic director only being able to target a single, unless there's something like DNS RR in place, which would mean another service for my setup.
Thanks for your time!
The text was updated successfully, but these errors were encountered: