Variations

In this lesson, we'll look at variations on the server-side integration with ESI approaches we've already discussed.

Different ESI implementations #

Of course, instead of Varnish, a different ESI implementation could be used by Squid or by a CDN like Akamai.

SSI #

Another option for server-side frontend integration is SSI (Server-side includes). This is a feature that most web servers offer. https://scs-commerce.github.io/ is an example of a system that uses SSI with the nginx webserver to integrate the frontends.

SSI and ESI have different benefits and disadvantages.

  • Web servers are often already available in the infrastructure for SSL/TLS termination or for other reasons. Because web servers can implement SSI, no additional infrastructure is necessary.

  • Caches not only speed up applications, but also compensate for web server failures for some time, thus improving resilience. This speaks for ESI and a cache like Varnish. ESI also has more features for further optimizing caching.

    • Correct caching can also be difficult to implement. For example, changing the data of a single data record can trigger a cascade of invalidations. Finally, every page and every HTML fragment containing information about the goods must be regenerated.

Get hands-on with 1200+ tech skills courses.