April 9, 2014
3 min read time

Varnish 4.0 Q&A on Performance, VMODs, SSL, IMS, SWR and more...

During our "What's coming in Varnish 4.0?" Hangout (see the video now) two weeks ago we got some questions. I am getting back to you with some answers.

From Atlanta, GA, USA Jason Price: Any chance of pulling forward any of the ESI enhancements that MAJOR_CDN use to iterate over ESI requests?

It seems that Akamai has an ability to generate a dynamic ESI template with iteration. The client and backend thread decoupling in Varnish 4.0 will allow to implement parallel ESI requests to the backends using multiple backend threads.
While looking round for an answer I found a great blog entry related to this questions which made a ESI Feature Comparison Between Apache Traffic Server and Varnish. (Thanks go to Espen for helping me with this answer).

From Poland MassiveScale.net: How do the new changes affect performance? The thread model is faster, but the general logic seems to be more complicated.

It might be perceived as more complex, but it is actually cleaner and simpler. When it comes to performance, user testing has shown a minimal reduction in latency: we are talking in the order of 0.1ms for background fetch requests. (Thanks Andreas aka scoof with this and next answer).

From the USA Iskferg Htiek: Can you cover the change from store and serve change for fetch again?

I believe Per explained that in the video and will write a blog post about that soon. What all this means in practical terms is that in Varnish 4.0 you will have:
  • ​Proper Streaming (it was a experimental feature in 3.0)
  • Support for Conditional request towards the backend (i.e. If-Modified-Since)
  • Background Fetches towards the backend (i.e. Stale-While-Revalidate)​

Add to this the power of VCL and you might get why we are getting all excited :-)

From Brazil Cleber J Santos: Is there an idea to implement SSL in Varnish 4 or higher?

Might be, but unless we can do it better than others do, chances are we won't. We still do HTTP though ;-)

(A personal side note: after seeing how the heartbleed bug has been merciless and rough with all of my sysadmin friends, I kind of agree more and more with PHK's stand regarding no SSL in Varnish.)

From London, UK Kerambrun, Ronan: What about Varnish 3 VMODs with Varnish 4?

Varnish 4 VMODs are a lot more powerful than they were in Varnish 3, i.e. all directors are VMODs and can be nested. The downside of this change is that a Varnish 3 VMOD (VMOD3) will need to be ported to Varnish 4 (VMOD4), but thankfully that is not so hard (at lest if you ask Dag). We have already strted the work of porting many VMODs. Also, the supported Varnish version (3.x or 4.x) will soon be visible in the VMOD Directory.

As for VMOD3 & VMOD4 porting I would recommend to check the following resources:

Keep in mind that for Varnish Software-supported VMODs we have created a 3.0 branch and now the master branch is (or should be) the code that will work in Varnish 4 (file a bug if is is not). As mentioned above, this is exemplified in the Example VMOD aka libvmod-example.

If you have other questions regarding what's new in Varnish 4.0, feel free to leave a comment here, reach me on twitter @ruben_varnish w/hashtag #varnish4 or send your questions to ruben@varnish-software.com.