Dear Varnish-Team,

First of all I would like to congratulate you for such an awesome product.


We wanted to send traffic directly to go-routers, which require us to send 
traffic to service port 80, but, do the health-check on port 8080. As doing the 
health check on port 80 is deprecated on go-routers.


We came across one such vmod oob_probe, which let us to do exactly the same 
what we are looking for. But this vmod is only compatible with varnish 4.1 and 
we are currently using the varnish version 5.2.


The another method we tried, we defined 2 backends in VCL one for port 80 and 
another for port 8080 for each go-router.


Then we applied round-robin director on backends wit?h port 8080. In assumption 
that director_round_robin.backend() will give us the name of the selected 
backend, where the incoming request will be forwarded to. Thereafter, we can 
modify the backend for example in vcl_backend_fetch() and set the correct 
definition of the backend, if the backend selected is go-router1:8080 by the 
round_robin director, we would set the backend go-router1:80.

But, this was also problematic as director_round_robin.backend() just return 
the name of director object, but, not the name of the chosen backend . Is there 
a way to fetch the name of backend chosen by the director before the request is 
sent to the backend? I am familiar it is possible to do so in 
vcl_backend_response. However, this is not very useful for us, in this scenario.


Best regards,

Naveen Goswami



_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to