If you’re familiar with Varnish already, you know that VMODs extend Varnish functionality and give Varnish the kind of flexibility that helps you deliver content the way you want to. We recently published a brief overview of all currently available Varnish VMODs to give you a high-level overview of all the VMODs that currently exist and want to provide a bit more detail about what the newest VMODs can do for you.

Introducing VMOD-http

I posted recently about the prefetch functionality in Varnish. While VMOD-http has a number of use cases (outlined briefly below), the prefetch function may be one of the ‘hotter’ topics because of its contribution to streaming. That is, with VMOD-http, Varnish can prefetch the next video segment to prewarm the cache and keep content flowing. You can read more about the prefetch function in the aforementioned blog post or join us for the live streaming webinar coming up on December 12 (register below).

But VMOD-http is more than just a prefetch function. It lets you execute HTTP requests directly from VCL. It is similar to the existing, open source vmod-curl, but supports both synchronous and asynchronous operation and connection pooling for higher efficiency.

  • Asynchronous operation: Fire and forget HTTP requests without waiting for the responses, or send HTTP requests in vcl_recv that process in the background until the responses are picked up in vcl_deliver. This means that VCL processing can continue without having to wait for the HTTP responses to return or time out.
  • Prefetch: As explained above, prefetch uses asynchronous operation to fetch the next object into cache, and it does this by anticipating the next request based on the current one. This is done when the next URL that would be requested is generated by incrementing the number sequence of the original one, but this is something I will explain more in the upcoming streaming webinar (be sure to register to attend below). Prefetch is particularly useful for video on demand (VoD) streaming and search engines, as the next video segment or search result page will already be in the cache before the client requests it.
  • Request mirroringPort mirroring is a well-known feature in layer-2 network switches where it is often used for monitoring (e.g. intrusion detection, real user monitoring for application performance). Request mirroring using vmod-http in Varnish is a similar concept, in that all or a percentage of the incoming client requests can be mirrored to another web server without waiting for the responses. This can be used as a kind of shadow server test environment, where production traffic can be directed at low risk. Request mirroring utilizes asynchronous operation.

We are happy to talk to you about VMOD-http and its uses… or welcome you to join us in our live streaming webinar, where you will learn more about the prefetch functionality of Varnish and VMOD-http.

REGISTER FOR THE WEBINAR