我们希望在部署在EKS(aws-kubernetes service(集群上的微服务之前部署一个varnish缓存。因为部署在EKS上的应用程序的ip是动态的。有什么好的解决办法。
我偶然发现了这篇文章:https://knplabs.com/en/blog/how2tip-varnish-dynamic-backend-dns-resolution-in-a-docker-swarm-context
作为Varnish Software的员工,我还建议您使用vmod_goto
,这是一个Varnish Enterprise VMOD。
AWS上的Varnish Enterprise无需预付许可费
您在标题中提到,您宁愿不购买Varnish Enterprise许可证。另一种选择是在AWS上使用我们的官方AMI。看见https://www.varnish-software.com/developers/downloads/#amazon-web服务aws获取更多信息。
在这些图像上仍然有许可证成本,但按小时收费,更便宜,甚至还有开发者版图像可供测试。
vmod_goto
已经打包在这些映像上,因此无需执行任何手动安装即可使用。
请参阅https://www.varnish-software.com/developers/tutorials/tags/cloud/有关此Varnish Enterprise产品的Ubuntu或Red Hat的逐步教程。
开源替代方案
然而,如果你想使用100%的开源软件,你发布的文章引用了https://github.com/nigoroll/libvmod-dynamic这是用于动态后端的开源替代方案。
您可以从源代码编译VMOD,并使用它的功能来处理动态后端。
此VMOD的API可在此处找到:https://github.com/nigoroll/libvmod-dynamic/blob/master/src/vmod_dynamic.vcc