Plone 如何制作varnish round robin zeo客户端

Plone 如何制作varnish round robin zeo客户端,plone,buildout,varnish,Plone,Buildout,Varnish,我想使用plone.recipe.varnisin构建来配置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

我想使用plone.recipe.varnisin构建来配置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

两者都不起作用,它们都给我“错误404未知虚拟主机”。我可以手动将varnish.vcl编辑为

director cluster round-robin {
  { .backend = { .host = "127.0.0.1"; .port = "8080"; } }
  { .backend = { .host = "127.0.0.1"; .port = "8081"; } }
}
每件事都按照我所希望的方式进行,除了我想在buildout中这样做

我使用的是统一安装程序Plone 4.0.5、Ubuntu 10.0.4(64位)、Varnish 2.1.3。有什么想法吗?谢谢

有关负载平衡的信息,请参阅

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

有关负载平衡的信息,请参阅

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

director cluster round-robin {
  { .backend = { .host = "127.0.0.1"; .port = "8080"; } }
  { .backend = { .host = "127.0.0.1"; .port = "8081"; } }
}