VCL – Magento和Varnish 3.0.2的configuration

我想问问是否有人可以帮助我configurationMagento的Varnish,以达到更多的命中。 我目前从varnishstat的比例是:

  1. cache_hit=271
  2. cache_miss=926

我很好奇,因为我几乎search了与这个主题相关的每个站点,但99.9%的configuration因为过时的代码而无法工作。

我的设置细节

  • 我在端口80上使用Varnish,在端口81上使用Apache,
  • PageCache作为Magento清漆模块,
  • 用于PHP速度的APC和用于dynamiccaching的Memcached。
  • 主页上的负载速度大约1.5s(Pingdom.com的平均结果)> USA ping&2.5s> Europe。
  • 服务器位于加拿大多伦多。

编辑:

这是我的完整VCLconfiguration> http://pastebin.com/885BzHC (我只是使用xxx.xxx.xxx.xxx为我的IP)这是从命令(varnishtop -i TxHeader -I Cookie)的信息:

 TxHeader Cookie: frontend=965b5...(*lots of numbers); adminhtml=3ae65...(*lots of numbers); EXTERNAL_NO_CACHE=1 

“(*很多数字)”只是我添加到信息

任何想法如何避免Varnish打这个cookies? (如果我得到正确的关于避免Vanrish击中cookie而不是caching主页的想法)。

感谢您的任何帮助!

我不与Magento合作,但是这里有一些Varnishbuild议对我有用:

检查Cookies

首先,你应该删除所有的点击清漆的cookie,当清漆看到一个cookie时,它会将请求发送到后端。

使用像这样的命令来查看哪些cookie被发送到后端:

 varnishtop -i TxHeader -I Cookie 

vcl_hash

其次,评估你是否真的需要vcl_hash 。 如果你没有理由使用它,请注明。

一次尝试一下,看看你的命中率是否提高。

HTH,祝你好运。