varnishtop 显示“列表长度0”?
清漆2.1.3 Ubuntu 10.04.02 LTS
varnishtop 仅显示“列表长度0”。
varnishstat 总是返回相同的结果:
1+12:29:32
CSV-004
Hitrate ratio: 1 1 1
Hitrate avg: 0.4272 0.4272 0.4272
556579 0.00 4.24 Client connections accepted
1122298 0.00 8.54 Client requests received
447675 0.00 3.41 Cache hits
27583 0.00 0.21 Cache hits for pass
......
有帮助吗?
Varnish 2.1.3
Ubuntu 10.04.02 LTS
The varnishtop show "list length 0" only.
The varnishstat always returns the same result as:
1+12:29:32
CSV-004
Hitrate ratio: 1 1 1
Hitrate avg: 0.4272 0.4272 0.4272
556579 0.00 4.24 Client connections accepted
1122298 0.00 8.54 Client requests received
447675 0.00 3.41 Cache hits
27583 0.00 0.21 Cache hits for pass
......
Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Varnish 有一些相当合理的默认值,但它假设您的应用程序不知道缓存。由于您可以控制您的应用程序,因此您可以做出一些默认情况下 varnish 无法做到的假设。例如,默认情况下,当启动页面的请求包含 cookie 时,Varnish 不会缓存任何页面。虽然如果 Web 应用程序未知,这是有意义的,但如果 Web 应用程序已知,那么让 Web 应用程序决定什么是适当的缓存响应就更有意义。
因此,既然您知道您正在使用的系统,您可以稍微调整配置。使用配置文件时,Varnish 的行为如下。 Varnish 将缓存所有静态内容(在特定目录内)。 Varnish 不会缓存任何其他内容,除非 Web 应用程序提供 max-age 或 s-max-age Cache-Control 标头。如果满足上述规则,即使存在 cookie,它也会缓存内容。假设您的 Web 应用程序足够智能,可以知道无论 cookie 是否存在,内容是否可以缓存。再次,请参阅去年的文章,了解如何在应用程序端进行设置...
您可以尝试以下链接以获取更多信息:
https://www.varnish-cache.org/trac/wiki/Introduction
Varnish has some pretty sensible defaults, but it assumes that your app is unaware of the cache. Since you are in control of your application, you can make some assumptions varnish can't by default. By default, for example, Varnish will not cache any page when the request that started it included a cookie. While this makes sense if the web app is unknown, if the web app is known, it makes much more sense to let the web app decide what is the appropriate cache response.
So, since you know the system you are working with, you can adjust the config somewhat. When using your config file, Varnish will behave as follows. Varnish will cache all static content (within a particular directory). Varnish will not cache anything else unless the web app provides a max-age or s-max-age Cache-Control header. It will cache content if the above rules are met, even if a cookie is present. The assumption is that your web app is smart enough to know if the content can be cached whether a cookie is present or not. Again, see last years article to see how to set this up on the app side...
you can try below link for more information:
https://www.varnish-cache.org/trac/wiki/Introduction