This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pivotal@Toemang vcl (master)]$ varnishtest get_is_cached.vtc | |
# top TEST get_is_cached.vtc starting | |
# TEST GET is cached | |
## s Starting server | |
### s listen on 127.0.0.1:9080 (fd 3) | |
## v Launch | |
### v CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/__v -a '127.0.0.1:9081' -T 127.0.0.1:9001 -P /tmp/__v/varnishd.pid | |
### v opening CLI connection | |
## s Started on 127.0.0.1:9080 | |
connect(): Connection refused |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "Authorization tokens are cached" | |
server s { | |
rxreq | |
expect req.url == "/" | |
expect req.http.Authorization == "Basic foo" | |
txresp -status 200 | |
rxreq | |
expect req.url == "/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "Authorization tokens are cached" | |
server s { | |
rxreq | |
expect req.url == "/" | |
expect req.http.Authorization == "foo" | |
txresp -status 200 | |
} -start | |
varnish v -vcl+backend { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C{ | |
#include <dlfcn.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <assert.h> | |
typedef int twitter_is_fresh_t(char *, char *); | |
static twitter_is_fresh_t *twitter_is_fresh_ptr = NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 RxRequest c GET | |
9 RxURL c /statuses/user_timeline.xml | |
9 RxProtocol c HTTP/1.1 | |
9 RxHeader c Authorization: Basic amFjazoxMjM0 | |
9 RxHeader c User-Agent: curl/7.18.1 (i386-apple-darwin9.2.2) libcurl/7.18.1 zlib/1.2.3 | |
9 RxHeader c Host: localhost | |
9 RxHeader c Accept: */* | |
9 VCL_call c recv | |
9 VCL_return c lookup | |
9 VCL_call c hash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "Test restarts in vcl_hit" | |
server s { | |
rxreq | |
expect req.url == "/foo" | |
txresp -status 200 | |
rxreq | |
expect req.url == "/foo" | |
txresp -status 200 | |
} -start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "Test restarts in vcl_hit" | |
server s { | |
rxreq | |
expect req.url == "/foo" | |
txresp -status 200 | |
} -start | |
varnish v -vcl+backend { | |
sub vcl_hit { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <pthread.h> | |
#include "config.h" | |
#include "memcached.h" | |
void make_thread_local_connection_key(); | |
void memcached_destroy(void *connection); | |
void make_prototypical_connection(); | |
void initialize_process(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pivot1@twitter-web029 ~]$ curl -H "Host: twitter.com" http://pivot4:pivots2pandas@localhost:81/statuses/user_timeline.xml -vvvvv | |
* About to connect() to localhost port 81 | |
* Trying 127.0.0.1... connected | |
* Connected to localhost (127.0.0.1) port 81 | |
* Server auth using Basic with user 'pivot4' | |
> GET /statuses/user_timeline.xml HTTP/1.1 | |
> Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 | |
> Accept: */* | |
> Host: twitter.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 Backend_health - mongrels Still healthy 4--X-S-RH 5 2 5 0.000773 0.000849 HTTP/1.1 200 OK | |
0 Backend_health - mongrels[1] Still healthy 4--X-S-RH 5 2 5 0.000702 0.000825 HTTP/1.1 200 OK | |
0 Backend_health - mongrels Still healthy 4--X-S-RH 5 2 5 0.000780 0.000831 HTTP/1.1 200 OK | |
0 Backend_health - mongrels[1] Still healthy 4--X-S-RH 5 2 5 0.000765 0.000810 HTTP/1.1 200 OK | |
0 CLI - Rd ping | |
0 CLI - Wr 0 200 PONG 1226357087 1.0 | |
0 Backend_health - mongrels Still healthy 4--X-S-RH 5 2 5 0.000760 0.000814 HTTP/1.1 200 OK | |
0 Backend_health - mongrels[1] Still healthy 4--X-S-RH 5 2 5 0.000755 0.000796 HTTP/1.1 200 OK | |
0 Backend_health - mongrels Still healthy 4--X-S-RH 5 2 5 0.000758 0.000800 HTTP/1.1 200 OK | |
0 Backend_health - mongrels[1] Still healthy 4--X-S-RH 5 2 5 0.000727 0.000779 HTTP/1.1 200 OK |