From 4876af06ddb280b0a01903c1da17466b13124eb3 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:52:33 +0100 Subject: Abort federation requests if the client disconnects early (#7930) For inbound federation requests, if a given remote server makes too many requests at once, we start stacking them up rather than processing them immediatedly. However, that means that there is a fair chance that the requesting server will disconnect before we start processing the request. In that case, if it was a read-only request (ie, a GET request), there is absolutely no point in building a response (and some requests are quite expensive to handle). Even in the case of a POST request, one of two things will happen: * Most likely, the requesting server will retry the request and we'll get the information anyway. * Even if it doesn't, the requesting server has to assume that we didn't get the memo, and act accordingly. In short, we're better off aborting the request at this point rather than ploughing on with what might be a quite expensive request. --- changelog.d/7930.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/7930.feature (limited to 'changelog.d/7930.feature') diff --git a/changelog.d/7930.feature b/changelog.d/7930.feature new file mode 100644 index 0000000000..a27e4812da --- /dev/null +++ b/changelog.d/7930.feature @@ -0,0 +1 @@ +Abort federation requests where the client disconnects before the ratelimiter expires. -- cgit 1.4.1