summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-02-10 20:16:01 +0000
committerLibravatar GitHub <noreply@github.com>2023-02-10 20:16:01 +0000
commit70739d32cc3894ce55f889c2e2fdb09d41e33df9 (patch)
treed7e0633f0f7f2a6267f6bc79f5966b86cf39f419 /cmd
parent[chore] small changes missed in previous dereferencer.GetAccount() PRs (#1467) (diff)
downloadgotosocial-70739d32cc3894ce55f889c2e2fdb09d41e33df9.tar.xz
[performance] remove throttling timers (#1466)
* remove throttling timers, support setting retry-after, use retry-after in transport * remove unused variables * add throttling-retry-after to cmd flags * update envparsing to include new throttling-retry-after * update example config to include retry-after documentation * also support retry-after formatted as date-time, ensure max backoff time --------- Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotosocial/action/server/server.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/gotosocial/action/server/server.go b/cmd/gotosocial/action/server/server.go
index 8cc31430b..7d4a1281d 100644
--- a/cmd/gotosocial/action/server/server.go
+++ b/cmd/gotosocial/action/server/server.go
@@ -203,10 +203,11 @@ var Start action.GTSAction = func(ctx context.Context) error {
// throttling
cpuMultiplier := config.GetAdvancedThrottlingMultiplier()
- clThrottle := middleware.Throttle(cpuMultiplier) // client api
- s2sThrottle := middleware.Throttle(cpuMultiplier) // server-to-server (AP)
- fsThrottle := middleware.Throttle(cpuMultiplier) // fileserver / web templates
- pkThrottle := middleware.Throttle(cpuMultiplier) // throttle public key endpoint separately
+ retryAfter := config.GetAdvancedThrottlingRetryAfter()
+ clThrottle := middleware.Throttle(cpuMultiplier, retryAfter) // client api
+ s2sThrottle := middleware.Throttle(cpuMultiplier, retryAfter) // server-to-server (AP)
+ fsThrottle := middleware.Throttle(cpuMultiplier, retryAfter) // fileserver / web templates
+ pkThrottle := middleware.Throttle(cpuMultiplier, retryAfter) // throttle public key endpoint separately
gzip := middleware.Gzip() // applied to all except fileserver