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?
Published at
2024-10-23 02:14:37Event JSON
{
"id": "0a1e66be40d2c076f03104415a8e2bba395fb695fb6d0e09b3fc61b220191514",
"pubkey": "3ffac3a6c859eaaa8cdddb2c7002a6e10b33efeb92d025b14ead6f8a2d656657",
"created_at": 1729649677,
"kind": 1,
"tags": [
[
"t",
"relay"
],
[
"t",
"nostr"
]
],
"content": "An idea about a #relay in #nostr\n\nHow 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?\n\nThis 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.\n\nIf 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?",
"sig": "cba967d8d12851282a3235abcfc20818412229b5de1fc35ac5fa566b0210bc1ff5cb60591b6721ef583620f574bd240ba20de6628e27a5d7373fdbc1ebb87fa0"
}