a machine could be hosting multiple relays, switching according to hostname

in general though the approach sounds good

Reply to this note

Please Login to reply.

Discussion

Here is the quandry I'm in. Nostr protocol always refers to relays by their URL (which includes path and query), not just their hostname and port. So in order to speak nostr properly, every URL should be treated as a different relay. That means wss://filter.nostr.wine/pubkey-1 and wss://filter.nostr.wine/pubkey-2 are different relays, and in fact there are a hundred thousand different relays sitting underneath filter.nostr.wine, actually the same server.

But this causes a proliferation of downstream effects. We connect to each of these separately. We auth to each of them separately. I'm pretty sure filter.nostr.wine only put keys in the URL temporarily and is removing it now that AUTH is implemented, and I think they probably noticed these effects (far too many connections to them).

It also causes difficulty in user management of relays. Users generally want to manage all the filter.nostr.wine relays in one place, not as 100,000 different relays.

But if I just ignore path and query, then I violate the nostr protocol strictly-speaking, and relays cannot use path and query for whatever neat idea they come up with (e.g. fiatjaf has a relay that serves notes just to the country you asked for, IIRC).

So I think the "right" answer is to use full URLs in most places (and if that causes overload on a relay, that's the relay's own issue not mine), but use (hostname, port) pairs for managing.

But what I just did instead was to use shortened URLs (path-removed) everywhere. And I'm using that branch of gossip and it seems fine, but I'm not comfortable that it is fine.