Do you pin IPFS files?

I’ve added a folder to IPFS network and accessed it through the Cloudflare’s gateway (great!).

Is there any information on how long it will be available?
Do you pin the files? Could I “unpin” them if needed?
Do you cache them and serve them through CDN for free? I wonder about the limits.

:wave: @agustinbv,

I don’t believe Cloudflare offers a pinning service based on their developer docs https://developers.cloudflare.com/distributed-web/ipfs-gateway/connecting-website/ you’d need to either use a pinning service or store it on your own server.

Cloudflare doesn’t have any limits that they advertise for caching content other than a max individual file size that I’m aware of. For their standard plans I believe this is 500MB, not sure if they have set a different limit for IPFS.

-OG

Last week I’ve tested adding a static website here. I don’t have the daemon running, and I still can access it.

➜  ~ ipfs dht findprovs Qmax1dMdvrxKZkKrkkV6XaDZk47Do1uCSvSNsonVhmduGn
QmcvBKxwRDuwgQpQhwx7td5z3HmjRP1DNxmvEYj4km8jQN
QmNjm16wkUUsUoRmr3b8QoQAPZYBwfBHcygkjGbSauTSWu
QmQPF396xeGSnrcZSSqSVJGigerAoCmnnAyzu8E8zGxQ7D
QmPcDM7QGkQZGc2EV12CiG6STbFF7G5w4gsFv4v4m48o6k
QmSUobMzQkFHYty1ABu7B6MtbYaDCK9APm4irtgg96xrhm
QmSfPx5uNa1Jh4Rn7LTtV6uaiVoWP7MjvMdzAKEM2R9swJ
QmYAXDCy9sZCEZFmQtFi6f5a7JbBoWJsixdHzrKuNPxumv
Qmb53qh7fo26k99u3KATf4nFDUbg2tnUPdfhAqp63jU67S
QmcywxEW3uxg3MQWrfWywVSS7YuhMvYuzBLQxvdGcjGzSS
QmdAXatABqmgZGZ8LJMMaCT3esQvpTPPqH3Pk9ZjDDA3JW

:doge:

sorry, here

:wave: @agustinbv,

It is being returned because the file is cached.

curl -I https://Cloudflare-ipfs.com/ipfs/Qmax1dMdvrxKZkKrkkV6XaDZk47Do1uCSvSNsonVhmduGn/
HTTP/2 200
date: Mon, 22 Oct 2018 13:19:50 GMT
content-type: text/html; charset=utf-8
set-cookie: __cfduid=dab02c2250c152ddc38b71f1898ec9e001540214390; expires=Tue, 22-Oct-19 13:19:50 GMT; path=/; domain=.Cloudflare-ipfs.com; HttpOnly
access-control-allow-headers: Content-Range, X-Chunked-Output, X-Stream-Output
access-control-allow-methods: GET
access-control-allow-origin: *
access-control-expose-headers: Content-Range, X-Chunked-Output, X-Stream-Output
cache-control: public, max-age=29030400, immutable
etag: W/“Qmax1dMdvrxKZkKrkkV6XaDZk47Do1uCSvSNsonVhmduGn”
last-modified: Mon, 22 Oct 2018 03:30:27 GMT
suborigin: ipfs000bciqlwwzzhztx2tb6msble7h56e4jyzngxru255pba73bxhxdvyh7dqy
vary: X-Ipfs-Secure-Gateway
x-ipfs-path: /ipfs/Qmax1dMdvrxKZkKrkkV6XaDZk47Do1uCSvSNsonVhmduGn/
cf-cache-status: HIT
expect-ct: max-age=604800, report-uri=“https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct
server: Cloudflare
cf-ray: 46dc42050f109b99

-OG

oh, I didn’t bother looking at the headers because I though that Cloudflare didn’t cache HTML, but you’re right

Cloudflare doesn’t offer pin services directly, but ipfs itself is distributed and on the ipfs side Cloudflare will still distribute your content as long as it exists in the ipfs infrastructure.

This is separate from the HTTP caching layer.

A pin service would ensure that this content stays online indefinitely, while Cloudflare will simply host this content on a temporary basis. You can test this by doing the following:

  1. Add a file to IPFS, accessing it through Cloudflare’s gateway.
  2. Turn off your IPFS server or remove the content.
  3. Access the content through another IPFS server or gateway (ipfs.io).

As long as your original content was truly original then it won’t be available on IPFS from anywhere but Cloudflare, yet at step #3 you’ll still be able to access it, at least temporarily.

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.