Ways to handle large VCL files

Comments

1 comment

  • Andrew Langhorn

    Our VCL files contain ACLs limiting certain HTTP request methods to certain CIDR ranges. I have played around with using includes in VCL to ensure consistency of ACLs across our VCL templates, and I blogged a bit about how they're used at http://ajlanghorn.com/2015/05/varnish-includes/

    The branch is sat by the wayside right now whilst I build the same thing in ERB so we can pre-process before handing off the generated version to Fastly. Pre-processing in this way would follow our convention for doing this sort of stuff, but other than a few tweaks to the way you deploy your VCL (include files have to be marked separately), I see no real issue with the way this works over the use of the ERB templates.

    It would be interesting to hear how you get on.

Please sign in to leave a comment.