[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #33072 [Core Tor/Tor]: When under load, give 503 aggressively for dirport requests without compression
#33072: When under load, give 503 aggressively for dirport requests without
compression
-------------------------------------------------+-------------------------
Reporter: nickm | Owner: dgoulet
Type: defect | Status:
| needs_revision
Priority: Medium | Milestone: Tor:
| 0.4.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: network-health 043-should consider- | Actual Points:
backport-after-0434 042-backport 043-backport |
Parent ID: #33018 | Points:
Reviewer: teor | Sponsor:
-------------------------------------------------+-------------------------
Comment (by teor):
I'm not suggesting any complicated new features.
The current logic is a bit complicated. And the code does not match the
man page.
At the moment, "always answer compressed" overrides
AuthDirRejectRequestsUnderLoad. I don't think that's useful or necessary.
And it's not documented.
Here is what the code does now:
* '''compressed requests''': always answer
* includes tor authorities, relays, clients: almost always compressed
* if AuthDirRejectUncompressedRequests is:
* '''1 - reject uncompressed''': all uncompressed requests will be
rejected
* '''0 - accept uncompressed''': uncompressed requests are handled based
on other options (see below)
* if AuthDirRejectRequestsUnderLoad is:
* '''1 - reject under load''': depends on the write bucket load:
* '''too much load''': we will reject uncompressed requests (usually
bots)
* '''room to answer''': we will answer uncompressed requests (usually
bots)
* '''0 - accept all''': we will answer uncompressed requests (usually
bots)
I don't think that's the design we want.
So I suggest we delete these lines:
{{{
if (c_method != NO_METHOD) {
/* Always answer compressed request. */
return false;
}
}}}
Here is what the code does after we delete those lines:
* if AuthDirRejectUncompressedRequests is:
* '''1 - reject uncompressed''': all uncompressed requests will be
rejected
* '''0 - accept uncompressed''': uncompressed requests are handled like
compressed requests, based on other options (see below)
* if AuthDirRejectRequestsUnderLoad is:
* '''1 - reject under load''':
* '''relay or authority''' always answer
* '''client''': depends on the write bucket load:
* '''too much load''': we will reject requests from clients
* '''room to answer''': we will answer requests from clients
* '''0 - accept all''': we will answer all requests
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33072#comment:22>
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