allegro / vaas

VaaS
http://vaas.readthedocs.io
Other
228 stars 30 forks source link

compose and kubernetes #385

Closed bytearchive closed 2 years ago

bytearchive commented 2 years ago

can it send vcl to pods running kubernetes?

in docker-compose router I can see this

[req.url ~ "^\/flexibleee"] second_service 51 pass cluster4_siteC_pro

does it mean if I access http://192.168.199.6:6082/www.flexibleee.com, it will forward it to cluster4_siteC_pro?

awmackowiak commented 2 years ago

Hey @bytearchive,

can it send vcl to pods running kubernetes?

Yes, you can. The servers are listening on two port:

  1. http port which are responsible for handle normal requests
  2. port witch are responsible for handle administrative request (ex.: telnet connectons)

So if you have exposed this second port from PoD the VaaS send compiled vcl to this port.

[req.url ~ "^/flexibleee"] second_service 51 pass cluster4_siteC_pro does it mean if I access http://192.168.199.6:6082/www.flexibleee.com, it will forward it to cluster4_siteC_pro?

The answered is: No. This will not match to this director but will get the first director defined in VCL. Because the last thing in vcl_recv block is defined return (hash); which is responsible to check if obj is in cache otherwise take from first defined backend in VCL. This is default Varnish behavior.

awmackowiak commented 2 years ago

If you have some more question feel free to open new issue with question mark.