Why Nostr? What is Njump?
2024-10-23 02:14:37

girinovey on Nostr: An idea about a #relay in #nostr How about a memory only relay? How much memory will ...

An idea about a #relay in #nostr

How about a memory only relay? How much memory will it need? How much faster will it be? If i decide to keep, say, only 1 week worth of events in memory (older events can be saved to disk or send to a second, private relay, that has a database, and restored "on demand" if anyone searches for it) how many events will that be and how much memory will i need?

This might be a way to improve relay performance. Today i see relays needing fast SSD disks to work, and even then, they use a lot of io operations.

If the relay kept everything in memory and did a dump to disk every half an hour or so, just to have a "backup" in case it ever restarted, i think we could reduce i/o pressure a lot. Is it feasible?
Author Public Key
npub18lav8fkgt8424rxamvk8qq4xuy9n8mltjtgztv2w44hc5tt9vets0hcfsz