dd if=/dev/zero of=1MB.dat bs=1m count=1
curl http://asset-manager.dev.gov.uk/assets --form "asset[file][email protected]"
We request assets from asset-manager.dev.gov.uk
in order to avoid the request going via assets-origin.dev.gov.uk
and static.dev.gov.uk
. The request does go through Nginx that handles the SENDFILE
header sent from the Asset Manager Rails app.
The Asset Manager app is run within Webrick on the Development VM which we think means it's running single-threaded so we used the default concurrency of 1 with Apache Bench.
# Serving files from disk
$ ab -n1000 "http://asset-manager.dev.gov.uk/media/5978b0e8759b740ff9000000/1MB.dat"
# Serving files from S3
$ ab -n1000 "http://asset-manager.dev.gov.uk/media/5978b0e8759b740ff9000000/1MB.dat?stream_from_s3=true"