Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: relay list update frequency? #88

Closed
hchiam opened this issue Sep 15, 2024 · 2 comments
Closed

Question: relay list update frequency? #88

hchiam opened this issue Sep 15, 2024 · 2 comments

Comments

@hchiam
Copy link

hchiam commented Sep 15, 2024

@dmotz, how often do you find or would expect that you'd have to update the list of relay URLs? i'm having fun building apps with trystero, but i'm thinking about how often i'd need to update my dependency on trystero for production.

maybe every few months, based naively on the worst case with the nostr part of the commit history notes below?

but then again, i'm guessing it shouldn't be a concern for developers building with trystero, since i'd hope it's very unlikely that all the relay URLs listed in the array will fail/close at the same time.

commit history notes/observations:

  • the list in src/nostr.js had removals from its defaultRelayUrls in July a couple times and also in April
    • so every 3 months, if we naively assume past patterns could be repeated in the future?
  • src/torrent.js had removals from its defaultRelayUrls in February and October a year ago in 2023 and removals from its defaultTrackerUrls in February and in October a few years ago in 2021
    • so every year?
  • (src/ifps.js only had an explicit bootstrapPeers list added in July)
  • (src/mqtt.js only had the order of its defaultRelayUrls updated, which it had since February)
  • (src/peer.js had defaultIceServers set up in March and had no removals so far, only an addition in July
@hchiam
Copy link
Author

hchiam commented Sep 15, 2024

to be clear, from what i recall, there has been at least 1 relay URL for nostr and for torrent that hasn't changed since the arrays have been created in the commit history up to the time of writing, but i feel a little concerned seeing the lists having a lot of the URLs removed or changed so far

@dmotz
Copy link
Owner

dmotz commented Oct 8, 2024

I usually check the relay lists when I cut a new release and prune ones that look to be failing. You can try this yourself by cloning the repo and running npm run test-relays.

Nostr has by far the most relays available (which is why it's the default) and if you're really concerned about redundancy you can pass a higher number for relayRedundancy in the room config object. The Nostr strategy defaults to 5 which is already quite a bit of redundancy. A more advanced option would be passing your own custom list of relays (as relayUrls) and you can find a huge amount of relays listed on nostr.watch. Just be sure to test them as some relays limit what you're allowed to do. Finally, you can always run your own Nostr relay on a server to have an extra layer of control over uptime.

Hope this helps.

@dmotz dmotz closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants