Think.. what if we used varnish instead of socat in the ambassador image?
$ docker run --rm --name endpoint_cache -P --link endpoint:endpoint bluepeppers/varnish
Voila, caching your http endpoint with the default varnish config:
$ time curl $(docker port endpoint_cache 80)/some/slow/endpoint -o /dev/null
real 0m30.838s
user 0m0.022s
sys 0m0.015s
$ time curl $(docker port endpoint_cache 80)/some/slow/endpoint -o /dev/null
real 0m0.030s
user 0m0.029s
sys 0m0.001s
Of course, still doesn't excuse that endpoint taking 30 seconds, but, you know, the demo's tomorrow! and the CEO just wants it working!
Content type
Image
Digest
sha256:ad6c2ad32…
Size
67.2 MB
Last updated
almost 11 years ago
docker pull bluepeppers/varnish