[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: question about cached-status

On Thu, Jul 10, 2008 at 02:59:57PM -0700, Steve Southam wrote:
> Hi

Hi!  Since you replied to Roger's email, I initially
assumed that you were referring to the directory protocol as used in
0.2.0.x.  For 0.1.2.x and earlier, the answers are different.  But
since your subject line says "cached-status", and that's a directory
used by 0.1.2.x and earlier, I don't know which version of the
protocol you mean.  I'll try to answer for both.

> When a network status is downloaded by a client, how does it determine how
> long the status is usable for?

In the v3 protocol, as used by 0.2.0.x, it has an expiry time.  From

    "valid-until" SP YYYY-MM-DD SP HH:MM:SS NL

        [Exactly once.]

        The end of the Interval for this vote.  After this time, the
        consensus produced by this vote should not be used.  See 1.4 for
        voting timeline information.

In the v2 directory protocol, as used by 0.1.2.x, clients refresh
individual status documents on a rolling schedule as described in
section 5.1 of dir-spec-v2.txt.  (Caches follow the rules in section
> If the server that the status came from goes
> offline, how does the client know not to use it?

In the v3 directory protocol, the network status document is a
multiply signed consensus that you can get from any cache.  If an
authority signing the consensus goes offline, a working consensus can
still be made as long as more than half of the authorities are
present.  If a cache goes offline, the client can get the consensus
from another cache.  (The client can tell that the cache is down when
it tries to connect there and fails.)

In the v2 directory protocol, each authority has its own view of the
network, ance clients download a view per authority from a cache.  If
a cache goes down, clients act as in v3 (they try another cache).  If
an authority is down for a long time, clients should eventually give
up trying to download that status document.  

hope this helps,