ipfs-cluster/api/ipfsproxy
Hector Sanjuan 1d98538411 Adders: stream blocks to destinations
This commit fixes #810 and adds block streaming to the final destinations when
adding. This should add major performance gains when adding data to clusters.

Before, everytime cluster issued a block, it was broadcasted individually to
all destinations (new libp2p stream), where it was block/put to IPFS (a single
block/put http roundtrip per block).

Now, blocks are streamed all the way from the adder module to the ipfs daemon,
by making every block as it arrives a single part in a multipart block/put
request.

Before, block-broadcast needed to wait for all destinations to finish in order
to process the next block. Now, buffers allow some destinations to be faster
than others while sending and receiving blocks.

Before, if a block put request failed to be broadcasted everywhere, an error
would happen at that moment.

Now, we keep streaming until the end and only then report any errors. The
operation succeeds as long as at least one stream finished successfully.

Errors block/putting to IPFS will not abort streams. Instead, subsequent
blocks are retried with a new request, although the method will return an
error when the stream finishes if there were errors at any point.
2022-03-24 17:24:58 +01:00
..
config_test.go Feature: Support multiple listeners in configuration 2020-02-28 11:16:16 -05:00
config.go Fix #937: Print full working configuration at startup 2020-05-15 01:33:04 +02:00
headers.go ipfsproxy: fix typos in comments 2019-01-11 13:36:56 +01:00
ipfsproxy_test.go Fix #1366: IPFS Proxy API serializes wrong error types 2021-06-28 22:42:47 +02:00
ipfsproxy.go Adders: stream blocks to destinations 2022-03-24 17:24:58 +01:00
util.go ipfsproxy: hijack repo/gc and trigger cluster-wide GC 2019-12-06 13:08:57 +01:00