Prior to Varnish 4, One could call a restart from vcl_fetch to start another flow reaching vcl_recv.
In version 4, logic was separated to client and backend, I need to be able to call a restart according to the backend response. One direction I thought might be possible is using vcl_synth as a middleware between backend and client but the backend can't send a specific error code or msg only standard 503 error.
Any ideas?