Varnish Edgestash Highlights

Categories

Varnish has unveiled Edgestash, which is currently in beta on Varnish Plus only. It’s an ambitious solution to increase web speeds, both on mobile and in general. While most of a modern website’s content is assembled in the browser, Varnish takes that page assembly and performs its using the the bits and pieces already stored in the cache, for instance, cobbling together a web page using JSON and content from other sources.

Without this solution, browser-based web page assembly is a more involved and clunkier process. It requires downloading and implementing a JavaScript framework and executing custom code which, in turn, needs to consume more data in order to ignite the assembly process. The process also needs to use the Document Object Model (DOM) to manipulate the objects that comprise a page in order to bring it all together, potentially triggering time-consuming  page reflows and repaints. This is a pain– especially on mobile browsers, even if they use HTTP/2.

Varnish promises that Edgestash can reduce that seconds-long process into a matter of tens of milliseconds. Edgestash is a pure templating language, based on Mustache, that obviates the need for JavaScript in page assembly. It’s also compatible with more nuanced syntaxes like Ember, Angular, and Handlebars.

Additionally, Edgestash compiles both the templates and affiliated JSON content into a streamlined byte code and stores it into cache, ideally in under a millisecond. This means that when time comes for page assembly, it simply needs to execute the byte code, reducing assembly time to under a millisecond. Edgestash only needs to compile once, meaning every use of the same template or JSON is optimized thereafter.

Finally, Edgestash is built on Varnish Cache and is compatible with VCL, allowing for custom logic execution required for a website. Because Varnish Cache is located at the edge of customers’ networks, latencies are reduced, leading to faster page response and load times and allowing for page assembly to occur on IP backbones. This configuration also allows the logic that is used to compose pages to be migrated to the edge.

Scroll to Top