Page MenuHomePhabricator

Sort out vcl_deliver vs vcl_synth mess with v4 VCL
Closed, ResolvedPublic


In Varnish3, all outbound requests ultimately ran through vcl_deliver on their way out. With Varnish4, several classes of response do not pass through vcl_deliver and instead use vcl_synth as an alternative code path. Those classes include:

  • synthetic response from vcl_recv and/or vcl_hash
  • backend fetch failures

We have a lot of code hooked into vcl_deliver, and much of it (but probably not all) should also be invoked for the vcl_synth path for non-PURGE requests, for things like X-Cache, X-Analytics, HSTS-setting, etc. It's a little bit complicated to untangle this, but we need to.

Event Timeline

BBlack created this task.May 19 2016, 12:22 AM
Restricted Application added a subscriber: Zppix. · View Herald TranscriptMay 19 2016, 12:22 AM

Actually it doesn't turn out to be as messy as it seems at first. It's mostly the analytics, debugging, etc headers in common code that need invocation in vcl_synth, but nothing cluster-specific seems critical yet.

Change 289588 had a related patch set uploaded (by BBlack):
VCL: v4 deliver synth refactoring

Change 289588 merged by BBlack:
VCL: v4 deliver synth refactoring

BBlack closed this task as Resolved.May 31 2016, 9:30 PM
BBlack claimed this task.