gpt4 book ai didi

plone - 如何制作 Varnish 循环 zeo 客户端

转载 作者:行者123 更新时间:2023-12-03 17:45:48 29 4
gpt4 key购买 nike

我想使用plone.recipe.varnisin buildout将 Varnish 配置为在2个zeo客户端之间进行轮询。在我的buildout.cfg中,我尝试过:

[varnish-build]
recipe = zc.recipe.cmmi
url = http://downloads.sourceforge.net/project/varnish/varnish/2.1.3/varnish-2.1.3.tar.gz

[varnish-instance]
recipe = plone.recipe.varnish
daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
bind = 127.0.0.1:8000
balancer = round-robin
backends =
client1:127.0.0.1:8080
client2:127.0.0.1:8081
cache-size = 1G


[varnish-build]
recipe = zc.recipe.cmmi
url = http://downloads.sourceforge.net/project/varnish/varnish/2.1.3/varnish-2.1.3.tar.gz

[varnish-instance]
recipe = plone.recipe.varnish
daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
bind = 127.0.0.1:8000
balancer = round-robin
backends =
cluster:127.0.0.1:8080
cluster:127.0.0.1:8081
cache-size = 1G

都不起作用,它们都给我“错误404未知虚拟主机”。我可以手动将varnish.vcl编辑为
director cluster round-robin {
{ .backend = { .host = "127.0.0.1"; .port = "8080"; } }
{ .backend = { .host = "127.0.0.1"; .port = "8081"; } }
}

一切都会按照我希望的方式进行,但我想在扩展中做到这一点。

我正在使用统一安装程序Plone 4.0.5,Ubuntu 10.0.4(64位),Varnish 2.1.3。有任何想法吗?谢谢!

最佳答案

有关负载平衡的信息,请参见http://pypi.python.org/pypi/plone.recipe.varnish

您也可以使用自定义varnish.vcl文件,并使用“config”选项指定该文件。我倾向于使用collective.recipe.template来输出VCL文件,因为无论如何我通常都需要一些自定义配置。

关于plone - 如何制作 Varnish 循环 zeo 客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5835581/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com