IPIP-0417: Delegated Peer Routing HTTP API

Henrique Dias (Protocol Labs) GitHub
Related Issues
Commit History
GitHub ipfs/specs (pull requests, new issue, open issues)

1. Summary

This IPIP specifies /routing/v1/peers/{peer-id} HTTP API to offload peer routing onto another server.

2. Motivation

The motivation of this IPIP extends the one of [ipip-0337] and [ipip-0379], which introduced delegated content routing and delegated naming, respectively. Now, we expand upon those basis to introduce peer routing, reducing the barrier for interaction across different systems.

3. Detailed design

Add /routing/v1/peers/{peer-id} to the existing [http-routing-v1] specification, as well as the new Peer schema, that replaces the existing "known transfer protocols".

4. Design rationale

In line with the remaining Routing V1 API, this IPIP introduces a new HTTP GET endpoint that is used to retrieve peer records for a certain peer.

4.1 User benefit

The user benefit brought by this PR is similar to the one in [ipip-0379], but instead of offloading the naming process, we offload the peer discovery and routing.

4.2 Compatibility

The section "Known Transfer Protocols" has been removed and replaced by a "Known Schemas" section. Before, we used to have protocol specific schemas, such as bitswap and graphsync-filecoinv1.

The usage of these schemas is no longer encouraged. Instead, clients and servers SHOULD be updated to use the new, more generic, peer schema, which avoids returning the same peer multiple times, making results more efficient when a peer supports more than one protocol.

See more in the "Compatibility" section of [ipip-0337].

4.3 Security

See the "Security" section of [ipip-0337].

4.4 Alternatives

See the "Alternatives" section of [ipip-0337].

A. References

Delegated Routing V1 HTTP API. Gus Eggert; Masih H. Derkani; Henrique Dias; Marcin Rataj. 2023-08-31. URL: https://specs.ipfs.tech/routing/http-routing-v1/
IPIP-0337: Delegated Content Routing HTTP API. Gus Eggert; Marcin Rataj. 2022-10-18. URL: https://specs.ipfs.tech/ipips/ipip-0337/
IPIP-0379: Delegated IPNS HTTP API. Masih H. Derkani; Marcin Rataj. 2023-02-13. URL: https://specs.ipfs.tech/ipips/ipip-0379/
Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119