[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches
#12538: Make all relays automatically be dir caches
-------------------------------------------------+-------------------------
Reporter: cypherpunks | Owner:
Type: task | Status:
Priority: High | needs_review
Component: Tor | Milestone: Tor:
Severity: Normal | 0.2.8.x-final
Keywords: tor-guard, tor-relay, prop237, | Version: Tor:
026-triaged-1, sebastian-review, | unspecified
027-triaged-1-out, 028-triage, 028-triaged, | Resolution:
mike-can, pre028-patch | Actual Points:
Parent ID: | Points:
Sponsor: | medium/large
-------------------------------------------------+-------------------------
Comment (by nickm):
Replying to [comment:76 teor]:
> Replying to [comment:75 nickm]:
> > Replying to [comment:74 teor]:
> > > I think if an operator sets DirCache 0, caching *and* serving should
stop.
> > > This is analogous with setting DirPort 0, and obeys the "principle
of least surprise".
> > > Otherwise, what can an operator do to stop serving directory
documents right away?
> > > (For example, what if they are close to quota for the month?)
> >
> > Right, I agree that DirCache 0 should always mean "don't cache."
> >
> > The issue I was thinking about is another part of the definition of
dir_server_mode:
> > {{{
> > int
> > dir_server_mode(const or_options_t *options)
> > {
> > if (!options->DirCache)
> > return 0;
> > return (server_mode(options) || options->DirPort_set) &&
> > router_should_be_directory_server(options, 0);
> > }
> > }}}
> >
> > This means that if `router_should_be_directory_server()` returns
false, we'll stop serving directory information, even if DirCache was set
to 1 and/or we advertised a dir_port.
> >
> > And the `router_should_be_directory_server()` function looks not only
at the configuration, but also at the current accounting state state,
which is the part that makes me a little concerned.
>
> There's an existing Tor feature that disables the DirPort if a relay
operator has bandwidth accounting limits enabled. This is intended to save
upload bandwidth for (symmetrical) circuit traffic, rather than (upload-
heavy) directory responses.
Does this feature turn off the DIrPort entirely, or only prevent us from
advertising it?
> Are you suggesting we remove this feature, and, if so, for relays using
the new all-cache feature, or all directories?
I was under the assumption that it made us stop advertising our DirPort,
but that it left the DirPort enabled. If it turns the DirPort off
entirely, then it's probably okay to leave the feature as-is in this
patch, and I am just being a forgetful old hacker.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12538#comment:77>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs