Skip to content

Instantly share code, notes, and snippets.

@rezan
Created July 6, 2020 18:30
Show Gist options
  • Save rezan/dc8df41f809a6327633a7438fa6fef6d to your computer and use it in GitHub Desktop.
Save rezan/dc8df41f809a6327633a7438fa6fef6d to your computer and use it in GitHub Desktop.
varnishscoreboard vcl_recv
varnishtest "varnishscoreboard vcl_recv"
barrier b1 sock 2
barrier b2 sock 2
server s1 {
} -start
varnish v1 -cliok "param.set thread_pool_track on" -vcl+backend {
import vtc;
sub vcl_recv {
vtc.barrier_sync("${b1_sock}");
vtc.barrier_sync("${b2_sock}");
return (synth(200));
}
} -start
client c1 {
txreq -url /123 -hdr "Host: hostname"
rxresp
} -start
barrier b1 sync
shell -match "client +recv.+GET hostname /123" {
varnishscoreboard -n ${v1_name}
}
barrier b2 sync
client c1 -wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment