Guidance on edge-caching partials with compression?

Comments

1 comment

  • Fastly Support

    Hi Ben,

    I think you may have a good use case for ESI. Here are some resources for getting started with using ESI:

    As far as your reasons for using ESI, I think you are on-track:

    Presumably more performant overall to travel to the origin for fewer bytes

    If your header and footer (and other cacheable parts of your site) are cached and implement ESI for non-cacheable pieces, it will be more performant and there will be less load on the origin.

    Store the layout on the edge so we can modify it without having to clear the cache on the whole page. If all views share a layout, we can swap only that part without clearing the page cache, eh?

    That is correct. As described in the blog, you could make all non-standard or unique layout pieces ESI calls.

    Currently we store entire documents, so can't easily roll out site-wide design changes etc. that all go into effect at the same time because pages are entirely cached at the edge.

    To take care of this, you can piecemeal the portions of pages that need to be purged by tagging certain objects with surrogate keys and performing surrogate key purges (more information on doing so can be found here: https://docs.fastly.com/guides/purging/getting-started-with-surrogate-keys). Then when those sections or pieces of your websites need to be changed, they can be all selectively purged at once. With this type of setup, many customers are able to cache everything but purely live content and per-user unique content.

    I’d like to clear up your uncertainties. In regards to ESI and Gzipping, we currently only support the use of both over HTTPS connections (not HTTP). If all of your traffic can run over HTTPS, then we can help enable the support of both by getting in touch with us at support@fastly.com.

    And to address your question about the performance of multiple cached partial pages vs. a single cached page, the overhead of increased requests should make up for the performance decrease of needing to purge the single cached page more often.

    Please let me know if I can offer any further clarity. If there is anything specific about your configuration that I can help with, don’t hesitate to reach out to us at support@fastly.com so we can go over it in detail.

    0
    Comment actions Permalink

Please sign in to leave a comment.