Okay, to share some test results:
I ran some load tests on an Amazon ec2 notary with and without nginx.
My test methodology is below for any one that's interested but the
results are good:
Regular version 2.0 notary, with no caching:
12 Requests/s average (744 valid responses served), 33% request
timeouts (4037 timeouts), 1178ms average response time.
Exact same notary, with nginx caching:
128 Requests/s average (7,725 valid responses served), 0.4%
timeouts (57 timeouts), 516ms average response time.
So adding nginx in front of the machine allows it to serve 10x as many
requests per second, with a 1/3 response time.
This is pretty fantastic. These tests were using a t2.micro ec2
instance, which has limited processing and network capabilities, but
they are still good results. I'd like to run more extensive tests to
compare various other notary settings, and we may be able to squeeze
even more performance out of nginx by changing the configuration, but
I'm comfortable using these tests results to say: using nginx as a
caching proxy improves performance - we should add it to all of the
default ec2 notaries.
Test Methodology
---
1. Create a list of 250 hosts, 240 of which are valid domains and 10
which are invalid
2. Set up a test using
blitz.io that will hammer a given server with
notary requests: 200 requests/second for 60 seconds (60 seconds is the
longest test time available under their free account tier).
3. Make sure the notary has valid database entries for all of the valid domains.
4. Run the test 10 times against each notary configuration.
5. Take the average of the results