-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 11/16/2015 12:24 AM, Dridi Boukelmoune wrote: > > I believe you're not supposed to use VCL_DelBackend directly, and > static backends are owned by the VCL. You're not supposed to > tamper with them. > > What is the use case?
It's for a VMOD to manage backends at runtime, meaning create and delete them. The use case takes us a little far afield, so let me come back to that further down. VCL_DelBackend is declared in $include_dir/cache/cache_backend.h, so it's available to a VMOD, and there's no indication that it's "not supposed to" be used. I've suspected that there are things in $include_dir that aren't really meant to be public, but if we're serious about that, and if Varnish is liable to crash if a VMOD does use them, then perhaps we should separate out the non-public interfaces. Or at least document them as non-public -- we have that in the *_int.h includes in vapi, for example. But it would be a real letdown if VCL_DelBackend is made unavailable with no replacement for removing backends. I don't see any other current interface that can do it. As I mentioned, VCL_DelBackend does work for the dynamic backends that the VMOD creates (with VRT_new_backend), and I haven't investigated why they're different from the static backends. I can live with a VMOD that can only remove its own backends, but the call seemed to me to be general enough for static backends as well, so I thought why not. >> Bug report? (Are we still using trac for that, or are we into the >> Brave New World now?) > > I think not. You think ... there should be no bug report? Or that we're not using trac any more? Or that we're not using github for bug tracking ... ? ... about that use case: It's for "microservices", which are lightweight backend apps running in docker containers that are managed by mesos/marathon, and are rapidly created, removed and migrated. So rapidly that we couldn't get it to work any more by changing the backend config in VCL and running vcl.load/vcl.use. We've been forced to add haproxies as an intervening layer, which are backends for Varnish, and they in turn get the changing backend configs. I'd like to use dynamic backends in 4.1 to be able to get rid of the extra layer, and for that, we need to be able to remove backends at runtime. Best, Geoff - -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstraße 32 22301 Hamburg Tel +49 40 2880 5731 Mob +49 176 636 90917 Fax +49 40 42949753 http://uplex.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWSaFXAAoJEOUwvh9pJNURVtQP/ibhGWpmvghc+EZ1kbDvrWly GyehuFE7Cq30yMQg4n4ZoH34stI2jV5ZASj8D7RAvDlygAXGr9Ow+ykdACRxrew3 dh2PqF/6ET/vcskyzIGBSC8LKUTu2avWZoKZD86YU++sggIQ+L+KDq4yvLUQyPGC nno29WdMnGFFZxuZb1G085kpq0UTwvpeIjY5NAkHEWezjfr5sQxGlJ4GI2Tku6SR kYO+AbSw8RgXsMczdw6wUheCiwG2bja3ZjYRpnyASPNjUpHkxnXCP7SNxd29EW8m uN+EqnK982dbbSv6UZURUfNsnCIFzgg5X+XvkI1TaA/Sg1QwuqUOYroO+hUvOM23 g+vo1rqeLYKbvSK1ioAhhPQcnPT4m3HHp+TxeeC6Ij7P3OASfBHG8WnzWIcO/lJd LLbhsRdwlt7bAlL8gg/TTtV+HvHQH314iDMLGslUEC1t2bzxOMVUFmYqAfJT7msr HoZxIdE+SPZB0Wyx/F0Xo4K1s8cCviY762govkVRR2rXf8r9aA6ca53BlzNrxMxQ 7NJZi7HRLvUTlHNoGguQe+p0rqsZJx0SdizRSbD6XYBUk5AXT8V7PB3/2cSRw1Sa BhDUeP29crcQAMM97YwfXF+h9uc+e7BHTIkJZT7ySX8u5OYMo/yWy+uMWuQzcHku TJe8VRy3ilxCTpyHBZiU =GR3f -----END PGP SIGNATURE----- _______________________________________________ varnish-dev mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
