diff options
author | Micah Elizabeth Scott <beth@torproject.org> | 2023-02-27 18:39:43 -0800 |
---|---|---|
committer | Micah Elizabeth Scott <beth@torproject.org> | 2023-05-10 07:38:28 -0700 |
commit | f3b98116b6f331ec9b849867dff8dec957ce7edc (patch) | |
tree | e1c34bd7db5d9c3e55e98fc2c971bcf6b1696690 /src/feature/hs/hs_service.h | |
parent | 20d7c8ce14eccccf97ad05de5c5281360fefd3bc (diff) | |
download | tor-f3b98116b6f331ec9b849867dff8dec957ce7edc.tar.gz tor-f3b98116b6f331ec9b849867dff8dec957ce7edc.zip |
hs_pow: Rate limited dequeue
This adds a token bucket ratelimiter on the dequeue side
of hs_pow's priority queue. It adds config options and docs
for those options. (HiddenServicePoWQueueRate/Burst)
I'm testing this as a way to limit the overhead of circuit
creation when we're experiencing a flood of rendezvous requests.
Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_service.h')
-rw-r--r-- | src/feature/hs/hs_service.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/hs/hs_service.h b/src/feature/hs/hs_service.h index 465d9fba80..37984bd6c8 100644 --- a/src/feature/hs/hs_service.h +++ b/src/feature/hs/hs_service.h @@ -265,6 +265,8 @@ typedef struct hs_service_config_t { /** True iff PoW anti-DoS defenses are enabled. */ unsigned int has_pow_defenses_enabled : 1; uint32_t pow_min_effort; + uint32_t pow_queue_rate; + uint32_t pow_queue_burst; /** If set, contains the Onion Balance master ed25519 public key (taken from * an .onion addresses) that this tor instance serves as backend. */ |