Skip to content

kad: Optimize GET_PROVIDERS query #497

@dmitry-markin

Description

@dmitry-markin

Currently, litep2p GET_PROVIDERS query on IPFS DHT takes tens of minutes, which is significantly longer than ADD_PROVIDER (under 3 minutes) and way longer than GET_PROVIDERS using Kubo IPFS client (typically under 5 seconds). We should optimize GET_PROVIDERS, matching the performance of Kubo IPFS (go-libp2p).

Note that internally ADD_PROVIDER uses FIND_NODE requests, and GET_PROVIDERS also mimics FIND_NODE with the difference that providers along the way are returned by queried nodes, and not just closer peers. This should provide some insights into making GET_PROVIDERS at least as fast as ADD_PROVIDER.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions