Git Product home page Git Product logo

varnish3to4's Introduction

varnish3to4

![Gitter](https://badges.gitter.im/Join Chat.svg)

Script to assist migrating a VCL file from Varnish 3 to 4.x.

Suggested usage

 $ varnish3to4 -o <filename>.v4 <filename>
 $ diff -u <filename> <filename>.v4

To include changes for Varnish 4.1:

 $ varnish3to4 --41 -o <filename>.v4 <filename>
 $ diff -u <filename> <filename>.v4

Currently understands

V3 V4
{bereq,req}.backend.healthy std.healthy({bereq.backend,req.backend_hint})
{bereq,req}.request {bereq,req}.method
{beresp,obj,resp}.response {beresp,obj,resp}.reason
beresp.storage beresp.storage_hint
{client,server}.port std.port({client,server}.ip)
error code response return (synth(code, response))
obj.hits - writing to -
obj.* in vcl_synth resp.*
obj.lastuse -
remove unset
req.backend req.backend_hint
req.grace -
req.* in vcl_backend_response bereq.*
return (fetch) in vcl_hit [1][2] return (miss)
return (hash) in vcl_hash return (lookup)
return (hit_for_pass) set beresp.uncacheable = true;
return (deliver);
return (lookup) in vcl_recv return (hash)
return (pass) in vcl_pass return (fetch)
return (restart) in vcl_fetch return (retry)
std.real2integer(..) [1] std.real2integer(.., n)
std.time2integer(..) [1] std.time2integer(.., n)
std.time2real(..) [1] std.time2real(.., n.n)
synthetic .. synthetic(..)
vcl_error vcl_backend_error and vcl_synth
vcl_fetch vcl_backend_response

Limited coverage

V3 V4
purge -

Won't be implemented

V3 V4
  • | vcl 4.0
  • | import directors
    new xx = directors.yy();
    xx.add_backend(ss);
    set req.backend_hint = xx.backend();

Add imports resulting from changes in V4, complete purge handling and any other changes missing from this document.

  1. Varnish 4.1 specific.
  2. This change is optional but might be mandatory in future versions.

varnish3to4's People

Contributors

fgsch avatar dridi avatar gitter-badger avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.