Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created November 29, 2011 12:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save KristianLyng/1404599 to your computer and use it in GitHub Desktop.
Save KristianLyng/1404599 to your computer and use it in GitHub Desktop.
VCL state diagram
.-----------------.
.----------| receive request |
v '-----------------'
.--------------.
| vcl_recv | Varnish 3.0 state diagram
.-----------|--------------|-------------. Not entierly complete.
| | req | | Misses error/restart and
v '--------------' v some internals
pass lookup pipe
| | |
| v v ____________________
| .----------------. .-------------. \ \
| | vcl_hash | | vcl_pipe | \ Shuffle data \
| |----------------| |-------------|---->) between client )
| | req | | req | bereq | / and server /
| '----------------' '-------------' /___________________/
| .-hash
| v .-------------.
| .---------. | vcl_miss |
| ( In cache? )--->No --->|-------------|-------.
| '---------' | req | bereq | |
| .-Yes '-------------' |
| v |
| .--------. .-------------. |
| .--No <-( HitPass? ) | vcl_pass | |
| | '--------' |-------------|-------.
| | .-Yes | req | bereq | |
| | v '-------------' |
| | .----------------. ^ |
| | | Make anonymous | | v
'--|-->| object |--------------------' .--------------------.
| '----------------' .-----------------| Fetch from backend |
| v '--------------------'
| .----------------------.
| | vcl_fetch |
v |----------------------|-----------.
.-----------. | req | bereq | beresp | v
| vcl_hit | '----------------------' hit_for_pass
|-----------| * *
| req | obj | .----deliver .----------------.
'-----------' |---------------------| hitpass = true |
| v '----------------'
| .-----------------------. .-----------.
| | vcl_deliver | | vcl_error |
'------>|-----------------------|<------------|-----------|
| req | resp | obj.hits | | obj | req |
'-----------------------' '-----------'
| .---------------.
'--------->| send response |
'---------------'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment