Do you plan on doing any sort of writeup on the final solution? With the generated list of urls (based upon the information you provided) It is significantly slower than the version I ended up coding up
https://github.com/icefox/skwurly by a factor of 3X. Now my version wasn't made as a varnish plugin, and some parts are ugly for speed reasons but there looked to be a number of techniques that could have been used.