Hey Gerold, thanks for the feedback.
>so nginx isn't activated by default with this update
No, I don't want to assume that people want to use nginx, or to force
it on them. For example, maybe you are running a server on your
internal network and don't need nginx caching. The heroku notaries do
not use it either, for example.
>You hardcoded the home dir
Ah, you mean in the nginx config file? Yes, that can be fixed.
>A notary administrator who has no knowledge of the Perspectives server
>internals it may be confusing of what's meant by "CherryPy". As I
>understand it it's the underlying python web engine?
Sure, I can clarify this. Yes, CherryPy is a python web framework. The
Perspectives notary server uses it to grab notary data and send it to
any requesting clients.
>Does this mean that all users have to change the port as well? Wouldn't
>it be simpler to just change the nginx.conf to 8080?
My goal with adding nginx to the default notaries is to not require
anyone to change their Perspectives extension settings. Right now the
default notaries all run queries on port 8080. So the example nginx
config file has a comment to serve requests from both port 80 and port
8080 - both of those will get mapped to the underlying notary server.
Thus, yes, I changed the notary server to run on port 8081 to talk to
nginx.
Perhaps it would be more clear if we had two configuration files: one
for the default notaries (that I will set up on them) and one for
everyone else, who probably doesn't need to serve requests from port
8080. If we did that, then, yes, we could just change nginx to talk to
port 8080, and that should make it easier to get things running with
the defaults without having to change anything.
Would that be more clear?
>What is the easist way to verify that the server is indeed profiting
>from nginx caching?
Great question - I'll add this to the guide also.
The easiest way to check is perhaps:
1. Request any data from your notary - e.g. visit
http://notary/?host=github.com
2. Look inside the nginx caching directory, likely ~/nginx/cache
3. There should now be a file inside that directory that contains the
XML output sent by the notary (i.e. an XML document with the data for
github.com)
Since the cache files in ~/nginx/cache use random names by default you
may want to look at the file with the most recent modification time.
It is possible to have the cache file names use a naming scheme - like
'gitub.com.cache' or similar - but I didn't specify that in the
default config file.
Another way to check might be: hammer your notary with many requests
and see if it can keep up ;)