Yes and the relay will run a bit faster with noReadAhead = false. It’s only something nostr:npub1nlk894teh248w2heuu0x8z6jjg2hyxkwdc8cxgrjtm9lnamlskcsghjm9c and I saw as our DBs scaled.
Discussion
Ah, good to know, thank you. Well i think it is fine for now as the relay won't likely hit the limit
The last question might be related how you handle malicious bot traffic that open multiple websocket connection. Does the value below can help mitigate that a bit?
#Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required)
autoPingSeconds = 55
#If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy)
enableTcpKeepalive = true
Shouldn’t make any difference. Websockets automatically disconnect without activity after 1 minute, so the 55 seconds auto ping will keep the sockets open even if nothing is being sent. Generally this is a good thing because you may want to keep the socket open for several minutes but only occasionally make REQs.
Malicious bot traffic will generally be sending lots of REQs (assuming they are wasting resources) not just connecting/disconnecting needlessly (although this happens with poorly made crawlers). Best way to address that is with a firewall in front of/apart of your proxy but you’ll have to see what kind of malicious traffic you get and then go from there!
Well, it can't be helped then. Since the main routing or reverse proxy comes from Huggingface. I assume they use traefik or similar proxy with their own settings. 😅
Semi has said that i can probably handle that in application level. So, i think i really need to add that in nostr-filter as it stands as frontend proxy application before strfry
Yes, thats probably your best option then. Unfortunately that means extra stress on your application, but if properly designed you should be able to mitigate it. I wouldn’t expect too much malicious activity at least for now.
Yes, thank you Mazin for all your suggestions. I really need to add that later as backlog. The last time i have checked the relay has peak of 1500+ connections, while normally around 20-30 alive connections. Thankfully it seems only affect a little bit with relay performance 😅