You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if we see a configuration with more than one URL for signal servers, we just pick the first one.
That's because we don't currently support having more than one signal server per discovery key. (If Alice talks to signal server X and Bob talks to signal server B, they'll never be introduced even if they have the same discovery key.) That's because servers don't know anything about each other.
To support multiple signal servers, I'd like to implement a swarm along these lines:
The server starts out with a list of known servers and tries to establish a direct websocket to each.
If a connection fails, it retries with exponential decay
When any two servers connect, they sync up on an Automerge document containing a directory of known servers, along with the discovery keys that each one handles, and the number of clients currently connected for each.
If the latest document contains servers that this server is not connected to, it tries to connect to each one.
The client starts out with the same list of known servers, and picks one somehow (randomly, lowest ping, etc.)
If a connection fails, the client picks another and tries it
When a client connects:
The client asks to be introduced to peers for a discovery key
If the server knows of another server that has already claimed that discovery key, it refers the client to that server
If the server hasn't seen the discovery key before, it claims the discovery key, accepts the client connection, and updates the shared directory document
HerbCaudill
changed the title
Select signal server if more than one is provided
Implement signal server swarm
Oct 15, 2019
randomly select a URL if more than one is provided? select best based on ping?
https://github.com/DevResults/cevitxe/blob/c8f9e8c6676987c5fed42131fd7115a22c9fd12e/packages/core/src/Client.ts#L23-L28
This comment was generated by todo based on a
TODO
comment in c8f9e8c in #26. cc @DevResults.Originally posted by @todo in #26 (comment)
The text was updated successfully, but these errors were encountered: