Cool! In general, what did you improve? I'm running nostr-rs-relay myself but it is pretty hangry for some CPU cycles. It is a pretty busy relay though.

Reply to this note

Please Login to reply.

Discussion

That fork uses postgres. The sqlite one can't handle concurrent loads that well

Yeah, when you mention it I remember I saw that PR in Scsibug's repo. Cool!

My relay was getting some light spam today and it also impacted `OK` replies, something funky going on with socket handling. I need to take a look again

How many active connections? What’s your cpu load / how many cores? I serve about 200 concurrent and I’m about 20-30% of one core/vcpu. Majority of load is reads; sqlite shouldn’t balk at concurrency—using separate db just means you’re shifting some compute over to your database cores.

Can’t remember how to check for active connections on the VM. CPU load is constantly 100% on all four cores. Literally constantly.

Unique pubkeys over the last 30 days is 96297

sqlite> select count(distinct author) from event where kind = 1 OR kind = 0 OR kind = 4 AND first_seen > 1671577200;

96297