# IPFS-cluster as a drop in replacement

**URL:** <https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012>\
**Category:** Uncategorized\
**Tags:** go-ipfs, ipfs-cluster\
**Created:** [August 19, 2022, 10:21am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012 "2022-08-19T10:21:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaitanyaprem](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chaitanyaprem/32/6519_2.png) [@chaitanyaprem](https://discuss.ipfs.tech/u/chaitanyaprem)\
**Post date:** [August 19, 2022, 10:21am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/1 "2022-08-19T10:21:48Z")

</div>

Hi,

We are trying to replace ipfs-cluster as a drop in replacement for existing single ipfs node.  
Hence, we have configured the [proxy](https://ipfscluster.io/documentation/reference/proxy/) endpoint so that switch happens seamlessly.  
We have noticed that files added to this endpoint are pinned in the cluster as mentioned in the proxy documentation, whereas the DAG blocks added using the `ipfs dag put` API are not getting pinned in the cluster eventhough passed with pin flag. ([Kubo RPC API | IPFS Docs](https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-dag-put)).  
Is there any configuration change that can be made to ensure dag blocks are pinned in the cluster when added via proxy endpoint?  
Hope i am not missing something obvious.

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [August 19, 2022, 3:46pm UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/2 "2022-08-19T15:46:43Z")

</div>

hey @chaitanyaprem .

So the IPFS proxy in Cluster does not handle the `dag/put` command and this is forwarded directly to the underlying node.

How are you using this endpoint? Do you want a recursive pin for every added dag object? Even though the option is there, I find it a bit weird to dag/put and pin, so I would like to hear more about how/why it is used.

For the record, I don’t think dag/import nor block/put are handled by cluster either.

---

<div class="post-metadata">

**Author:** ![chaitanyaprem](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chaitanyaprem/32/6519_2.png) [@chaitanyaprem](https://discuss.ipfs.tech/u/chaitanyaprem)\
**Post date:** [August 23, 2022, 5:36am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/3 "2022-08-23T05:36:33Z")

</div>

Hey @hector,

Thanks. I have also realized that dag/put is not intercepted after going through the documentation.

We are using IPFS for 2 aspects, to upload json like data snapshots (of data from specific smart contracts) using `ipfs add` and store IPLD objects which form a DAG-chain via `ipfs dag put`. As we run our own IPFS node, we want to pin all these objects and files so that they are available and not gc’d.  
But, as the data keeps growing we are planning to migrate from a single IPFS node to a cluster to get around [IPFS GC limitations](https://discuss.ipfs.tech/t/workaround-to-deal-with-go-ipfs-gc/14528/3).

In order to make it work as a drop-in replacement to single node, we have started using the proxy endpoint for the 2 operations i have mentioned above. If the proxy endpoint doesn’t support pinning `dag put` in the cluster, then one option is as you have mentioned perform 2 operations (first do dag/put and then pin the CID returned) which would not be optimal and would require specific code changes when using the cluster.

Is there any plan to intercept dag/put also at the proxy endpoint? This would simplify things as cluster and single IPFS nodes can be interchanged.  
Is there any other alternative where-in by using a different endpoint we can dag/put and pin the CID in the cluster via single operation?

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [August 23, 2022, 9:39am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/4 "2022-08-23T09:39:55Z")

</div>

> [@chaitanyaprem](#):
>
> Is there any plan to intercept dag/put also at the proxy endpoint?

Sure, we can add this. I have added an issue for tracking: [ipfsproxy: intercept dag/put and block/put and perform a cluster pin · Issue #1738 · ipfs-cluster/ipfs-cluster · GitHub](https://github.com/ipfs-cluster/ipfs-cluster/issues/1738)

---

<div class="post-metadata">

**Author:** ![chaitanyaprem](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chaitanyaprem/32/6519_2.png) [@chaitanyaprem](https://discuss.ipfs.tech/u/chaitanyaprem)\
**Post date:** [August 23, 2022, 11:54am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/5 "2022-08-23T11:54:13Z")

</div>

Thanks @hector .

Any idea what would be the timeline for this to be available atleast as an RC candidate?

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [August 25, 2022, 7:59pm UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/6 "2022-08-25T19:59:03Z")

</div>

> [@chaitanyaprem](#):
>
> Any idea what would be the timeline for this to be available atleast as an RC candidate?

It can prob go in the next release… ~3 weeks?

---

<div class="post-metadata">

**Author:** ![chaitanyaprem](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chaitanyaprem/32/6519_2.png) [@chaitanyaprem](https://discuss.ipfs.tech/u/chaitanyaprem)\
**Post date:** [August 31, 2022, 11:15am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/7 "2022-08-31T11:15:30Z")

</div>

Thanks @hector , will keep tracking the issue you have raised.

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [September 9, 2022, 3:29pm UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/8 "2022-09-09T15:29:38Z")

</div>

I have merged support for this to master. I can’t believe I’m on schedule with what I promised.

---

<div class="post-metadata">

**Author:** ![chaitanyaprem](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/chaitanyaprem/32/6519_2.png) [@chaitanyaprem](https://discuss.ipfs.tech/u/chaitanyaprem)\
**Post date:** [September 10, 2022, 6:43am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-as-a-drop-in-replacement/15012/9 "2022-09-10T06:43:03Z")

</div>

Oh wow, great to hear about this. We will pick it up in the next release.  
Thanks a lot for the help @hector
