4

I'm investigating using Varnish with ESIs to cache page content for a high traffic forum-like website.

Context : I want to cache content for visitors only (connected users will have a really different display and need absolute fresh content). Still, for visitors, some parts of a page need to be dynamic : - not cachable, for example for a visitor-dependant module (think a 'suggestion' widget that is fed with a real-time analysis of the pages viewed, thanks to a beacon) - cachable with a small TTL of 15mn, for example for a 'latest posts' widget or for very changing ads campaigns.

Currently we are using Apache/PHP/symfony/memcache to cache pages and have in-house ESI-like mecanism : a page from cache is parsed and some specific tags are interpreted (including calls to web services and/or databases). This is not performant enough since server time is then around 700ms.

In remplacement of this solution, we can have Varnish+ESIs. The total nb of ESIs included in a page can reach 15. The real number of ESIs to fetch will be less than that but not so much given the ESI's TTLs. The critical problem is that Varnish fetches the ESIs sequencially instead of parallel and this is not acceptable. This feature is somewhere late in Varnish's roadmap.

So,

  • What is your experience with Varnish and ESIs ? How many ESIs, response time gain that you have ?

  • Do you know workarounds or other serious and configurable (VCL was nice) reverse-proxies with parallel ESI fetching ?

  • If not, what kind of good caching strategy do you use for equivalent use-cases ?

Thanks, P.

4

1 回答 1

1

目前我在一个高流量的网站工作,性能就是我们的一切。在几个页面上,我们使用了很多(20 多个)ESI,例如在我们的搜索结果列表中。结果列表是 JSON 响应,其中的每个结果块都是一个单独的 ESI。好的,我们进行缓存预热。但是我们在这方面没有遇到任何性能问题。如果后端请求真的很慢,那么 ESI 的数量将是一个问题。

并行 ESI 获取在 Varnish 的功能请求列表中,但我认为它没有在 4.1 版中实现。

于 2015-10-25T23:54:00.257 回答