Alex Gleason on Nostr: Putting a timeout seems to be helping a lot because it's a sweeping fix. That ...
Putting a timeout seems to be helping a lot because it's a sweeping fix. That combined with rate-limiting ws messages covers the basics. But I think I need to also punish slow queries similar to rate-limiting, so that if you spend too much query time over a period you get blocked for a short period.
Published at
2024-07-01 23:19:57Event JSON
{
"id": "41c3bde081ceefffdb3cea42e5d476f110f46d1b73f1e7ba8b585df458c6d7ba",
"pubkey": "0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd",
"created_at": 1719868797,
"kind": 1,
"tags": [
[
"e",
"ffc1526aee988e504f1d13983d4e9295705539671f159f2e31cc05bd83234196",
"root"
],
[
"e",
"979b189a32ecd96e2eafaee212988ca54fb4197122d6fbc3708f7703caee3283",
"reply"
],
[
"p",
"ee11a5dff40c19a555f41fe42b48f00e618c91225622ae37b6c2bb67b76c4e49"
],
[
"p",
"00000000827ffaa94bfea288c3dfce4422c794fbb96625b6b31e9049f729d700"
]
],
"content": "Putting a timeout seems to be helping a lot because it's a sweeping fix. That combined with rate-limiting ws messages covers the basics. But I think I need to also punish slow queries similar to rate-limiting, so that if you spend too much query time over a period you get blocked for a short period.",
"sig": "af404f5faad236742277fa52221f91211ef34259aca675597890b85cf186fb8eb8b034ee242ef66683f2e89f5d4e8131b8856a30fafce353610de345d0fb65fe"
}