Skip to content

Experiment with websocket-star in js-ipfs fallback #63

Closed
@lidel

Description

@lidel

This may be a low hanging fruit and a safer way to improve performance than #58 until we get relay autodiscovery enabled in the future.

@ ws-star Client

README at js-libp2p-websocket-star states that:

We host a rendezvous server at /dns4/ws-star.discovery.libp2p.io that can be used for practical demos and experimentation, it should not be used for apps in production.

It is enabled by passing it in js-ipfs config like this:

{
  "config": {
    "Addresses": {
      "Swarm": ["/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star"]
    }
  }
}

AFAIK peerpad hosts uses own star server(s) (see below), we probably could do the same and use them in Companion as well (ipfs/ipfs-companion#457).

Bonus: support multiple stars?

libp2p/js-libp2p-websocket-star#61:

mkg20001/js-libp2p-websocket-star-multi substantially improves rendezvous server handling by allowing multiple connections and not suiciding startup if one of them is down. This dramatically improves stability and usability and should be the default.

@ ws-star Server

IIUC this is something we get out of the box right now because @victorb mentioned that:

new version of ws-star has been deployed!
Making discover of peers muuuuuch faster

Relevant change libp2p/js-libp2p-websocket-star-rendezvous#27 (comment):

For peer-star-app we would like to be informed of all other peers that are already connected to the rendezvous server when we connect to it. More details on this PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions