Saturday, September 22, 2012

Boltsort for better Varnish cacheability


At Vimeo we use Varnish to cache our player traffic. It has worked out great for us. Varnish at this point has no built in module to sort querystrings.  Say I have two of these:

"/video/48088296?title=0&byline=0&portrait=0&color=51a516"
"/video/48088296?byline=0&color=51a516&portrait=0&title=0"

Obviously we want to treat the above one and the same:
   "/video/48088296?byline=0&color=51a516&portrait=0&title=0"

We evaluated a few vmods. We were not happy with their performance/stability. So I wrote boltsort that is 2 times faster than existing implementations and has been running nice and stable.

2 comments:

Per Buer said...

Hi.

Could we relicense this under FreeBSD license? Maybe we could include boltsort in the core varnish distribution and having it under FreeBSD license would make it easier.

Naren said...

That is awesome:) I am fine with changing to FreeBSD. Since It is part of vimeo repo, I need to discuss this internally. It shouldn't take long.