Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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