yukimochi / Activity-Relay

Yet another powerful customizable ActivityPub relay server written in Go.
https://relay.toot.yukimochi.jp/
GNU Affero General Public License v3.0
278 stars 39 forks source link

High response time for some POST requests #86

Closed mhamzahkhan closed 5 months ago

mhamzahkhan commented 11 months ago

Hello!

I'm seeking general advice on resolving some high response time issues with my relay.

I'm seeing a lot of POST requests which are timing out on the client side.

I believe Mastodon's default timeout is 10 seconds, and for some reason, on my relay I can see when a "POST /inbox" request comes in, sometimes it takes over 10 seconds to respond.

This is only for some requests, the majority are processed under 200 ms.

I don't think the ActivityRelay server is CPU bound, as the ActivityRelay server doesn't seem to be consuming very much CPU.

I was wondering if you might know options for tracking down the bottleneck and why some requests have extremely high response times, whereas others are extremely quick?