The InterPlanetary File System (IPFS) has long been hindered by slow content publishing times, often taking dozens of seconds or even minutes to complete [1]. However, with the introduction of Optimistic Provide, this bottleneck has been significantly addressed, reducing the latency from around 15 seconds to less than 1 second [2]. This optimization technique, recently shipped as a default in IPFS's Kubo 0.39.0, has been shown to improve performance by over one order of magnitude while simultaneously reducing the network overhead by 40% [3]. Optimistic Provide works by replacing the traditional rigid waiting algorithm with statistical heuristics, allowing for predictive termination and early return of control to the user [4].

The technique involves immediately storing records with peers that are likely among the 20 network-wide closest peers, terminating the DHT walk when the set of discovered closest peers is likely to constitute the network-wide closest peers, and returning control back to the user after most of the PUT RPCs have succeeded [5]. This approach has been tested and validated through extensive measurements, showing a significant reduction in upload latency and improvement in record availability [6]. The implications of this optimization are substantial, enabling sub-second PUT operations for 90% of requests from North America and Europe, and making content publishing almost real-time [7]. However, there are limitations to the technique, including the reliance on a reliable network size estimate and the potential for overestimation due to undialable peers [8].

To address these limitations, future work will focus on incremental improvements, such as peer filtering, deeper Reprovide Sweep integration, and cached network size estimation on disk [9]. Overall, Optimistic Provide represents a significant advancement in IPFS content publishing, making it more suitable for delay-intolerant use cases and paving the way for further improvements in the protocol's performance.

Sources

  1. dl.acm.org/doi/abs/10.1145/3544216.3544232
  2. ieeexplore.ieee.org/abstract/document/10621404
  3. github.com/ipfs/kubo/releases/tag/v0.39.0