cost 155 ms
如何在使用哈希请求主体的 Varnish 中使用 vcl 设置基于 hash 的控制器? - How to set up a hash based director using vcl in Varnish which is using the hashed request body?

我正在尝试将 Varnish 设置为使用请求主体的 hash 在后端之间进行路由。我找到了使用主体访问设置缓存的好示例,其中请求主体的 hash 用作缓存键。 我找不到使用正文 hash 进行路由的示例。 我尝试了以下但它似乎不起作用。 这可能是因为 bodyaccess 不应该以这种方式使用。 ...

通过从子请求中提取响应 header 并将其添加到原始请求中,清漆错误“Uncached req.body can only be consumed once” - Varnish error "Uncached req.body can only be consumed once" by extracting response header from subrequest and add it to the original request

我有一个 api 和 jwt 身份验证(不记名令牌)。 每个 api 请求都会发送 jwt。 为了验证 jwt,我在后端有一个特定的路由 ( GET /_jwt_user_sub )。 使用有效 jwt 对该路由的请求返回X-User响应 header,代码为200和Content-Type: a ...

在 Varnish 中组合标头 - Combining headers in Varnish

我在彼此之上运行多个 Varnish 缓存服务器。 我想“组合”它们每个的标头,也就是说,当我向我的网站发出请求时,我可以看到它命中了哪个缓存服务器。 现在,两个缓存服务器都有这个代码: 在我的第二个缓存服务器上,我希望有这样的东西: responsefromfirst是前一个缓存中的“X-Cac ...

如何在 Varnish 中缓存内容? - How to cache content in Varnish?

我们如何使用清漆缓存来缓存内容(如游戏更新、文件等)? 我还想在没有缓存的情况下反向代理 https 连接。 我之前用 Nginx 做过,但现在我想切换到 Varnish。 我也搜索了谷歌,但没有示例/配置可以用 dnsmasq 等来做这件事! 我尝试通过获取主机 header 并使用 Varni ...

如何为包含 WordPress 的多个应用程序和以 nginx 作为代理的 Ghost CMS 配置 Varnish? - How to config Varnish for multiple application containing WordPress and Ghost CMS with nginx as proxy?

我们正在为 WordPress 和 Ghost 博客平台设置清漆缓存系统,以 nginx 作为网络服务器/代理。 Wordpress Vcl(默认) Nginx 所有 WordPress 站点的 Vhost 一旦我们为 Ghost 添加另一个 vcl 文件,这就完美了,我们得到 ghost c ...

Varnish 如何为移动和桌面站点缓存 - Varnish how to cache for mobile and desktop site

我想知道如何缓存移动和桌面网站。 我有移动和桌面站点,其根目录写在 nginx 中。每当用户访问该站点时,移动/桌面都会根据用户代理向用户提供服务,因此在这种情况下,如何为移动站点缓存和为桌面站点缓存,以便当用户访问网站时,从缓存中获取正确的内容。 请帮助在 Varnish 中编写用于移动和桌面缓存 ...

如何在我的 Varnish 配置中绕过 robots.txt 和 sitemap.xml? - How do I bypass robots.txt AND sitemap.xml in my Varnish configuration?

由于 Varnish,Google 很难呈现我的 robots.txt 文件。 当我尝试访问 robots.txt 文件时,我收到 503 Service Unavailable 页面。 我已经通过以下方式解决了绕过我的站点地图的问题: 以下是绕过这两项的适当语法吗: ...

清漆 Xkey softpurge - Varnish Xkey softpurge

我正在尝试对从不同主机存储的对象管理 Xkey 软清除,使用 Xkey 作为一种标记来清除与 Xkey 标记匹配的所有对象,而不考虑散列。 首先,这可能吗? 或者在任何情况下都在循环中散列? 在vcl_recv中,我使用set req.http.xkey = req.url; 然后在PURGE调用 ...

基于缓存控制 header 而不是 cookies 的清漆 4+ 上的缓存 - Cache on Varnish 4+ based on Cache Control header and not cookies

我想仅基于缓存控制 header 在清漆上缓存。 如果提到 public 或 max-age,那么页面应该被缓存而不考虑 cookie,如果没有存储或无缓存缓存应该绕过并且应该使用 cookie 建立正确的 session 连接。 不知道我在这里做错了什么。 我还想对用户隐藏缓存控制 header ...

Varnish: Cluster - 清除所有 varnish 主机上的缓存 - Varnish : Cluster - Purge cache on all varnish hosts

我正在使用(免费)版本的 varnsih(版本 6)。 这是我的配置: 2 个清漆主机(varnish_A、varnish_B) 2 个网络服务器(node_A、node_B) 我只缓存来自我的 web 服务器的所有页面 /app/api/client (GET),它运行良好但是我有一个问题,当 ...

malloc 和文件清漆存储一起提高性能? - Malloc and file varnish storage together improves performance?

需要您关于清漆内存存储的建议 目前我们使用以下参数运行 varnish 社区版本6.0.1 在这里减少分配的 500G 缓存大小会有所帮助吗? 因为我们知道缓存大小不会超过 30G(包括头部空间) (对象大小范围从几个字节到最大 1MB,都是 json 类型) 我们知道file存 ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM