It can certainly be done. Haven already does this for a specific pubkey: it imports, stores, and serves all notes written by the relay owner or in which the relay owner were tagged by someone in their web of trust. It works by subscribing to a configurable list of other relays, much like a client would. In V2, it will also gain the ability to whitelist and import notes from more than one pubkey.

A relay could also try to fetch all notes from your followers. It can even use the Outbox model to figure out where to download notes from. In fact, this is a feature that has been requested for Haven itself. I’m not sure if any specific relays already implement it, but I think nostr:nprofile1qqsd6ejdteqpvse63ntf7qz6u9yqspp4z7ymt8094urzwm0x2ceaxxgprdmhxue69uhhg6r9vehhyetnwshxummnw3erztnrdakj7qguwaehxw309a3ksunfwd68q6tvdshxummnw3erztnrdakj7qg3waehxw309ahx7um5wghxcctwvshskcpe2h once mentioned she had a way to do this for specific npubs and therefore didn’t need client-side follow lists (was it with Citrine?).

The same caveats described above still apply, though. My Haven database export plus Blossom data is several gigabytes. Even with CDNs and heavy caching in the middle, Nostr + Blossom is often enough to saturate my link. I certainly wouldn’t be able to run this from a mobile relay. So, basically, you need to “connect the edges” of the social graph through relays carefully, consciously of the tradeoffs.

Reply to this note

Please Login to reply.

Discussion

For one user like you or me, and say 500 npubs they follow, how big does that event store get if you were to store just the events from all those npubs? And that's not even counting blossom server files/image caching.

What do you think is the ceiling for how many users' notes can fit on a relay running on a raspberry pi? Before you need to start looking at bigger hardware.

I honestly don’t know. User activity levels vary substantially, there are different kinds of notes beyond just short and long text, and a single black swan event such as “Reply Guy” or even a misbehaving client can drastically change the outcome. Maybe folks running WoT relays, such as Utxo and nostr:nprofile1qqsrl7kr5my9n6423nwaktrsq2nwzzenal4e95p9k9826mu294jkv4cpr4mhxue69uhksctkv4hzuemfwf5kumewdaexwtm0w46xymmcqydhwumn8ghj76rpwejkutn8d9exjmn09ehhyee0vd5xzaqpremhxue69uhksctkv4hrytn8d9exjmn09ehhyee0da6hgcn00qzf4t0k can give you a better idea.

For a single user, you can store all your notes on a Raspberry Pi.

For 500 users, storage needs remain modest, around 2 GB per year.

The main limitation of a Raspberry Pi is disk performance. High loads often occur due to I/O wait times. To achieve reliable performance, use a Raspberry Pi 5 with a PCIe NVMe adapter and NVMe drive. With a 100 GB NVMe disk, you could realistically run a full public relay.

Thank you! That's really useful info.