Improving load times ipfs hosted static site

Hi, I am writing a blog about decentralization and it can currently be accessed old skool via an nginx server, or through the ipfs gateway I run on that server.

What is the approach to figure out what is actually causing these load and/or resolve times?

What is the thing to do to improve load and/or resolve times?

Any hints are much appreciated!

Cheers,
Mark

2 Likes

Are you pinning the site on the gateway?

IPNS optimization work is currently in progress. You could always give out the IPFS hash and add a “load latest” button somewhere that goes to the IPNS hash (which points to a HTML redirect page which in turn redirects to the IPFS hash).
You could use JavaScript to make this transparent to the end user.

1 Like

Ah, no I didn’t pin. I thought that was explicit for the node that adds data.

And thanks for the redirect tip, will do.

Thanks a lot @es_00788224!

It seems that objects that were added to a node are indeed pinned by default, see https://ipfs.io/ipfs/QmNZiPk974vDsPmQii3YbrMKfi12KTSNM7XMiYyiea4VYZ/example#/ipfs/QmP8WUPq2braGQ8iZjJ6w9di6mzgoTWyRLayrMRjjDoyGr/pinning/readme.md

The relevant piece of content:

$ ipfs pin ls --type=all
.
.
.
QmUAz4unWjfWa7xkHttod8gG3gfyob3HrWFByUvrKH6Toa recursive

So: content was pinned, but loading the content is super slow (sometimes).

Are there other steps to follow to find the root cause?

Thanks!
Mark

I started digging a bit deeper, some observations:

So that doesn’t really lead up to some conclusion :slight_smile:

Does anyone have an idea how to analyze what the cause is? I have some other ideas, but it needs to get slow again :slight_smile:

2 Likes

@pors thanks for testing this stuff. The core maintainers of go-ipfs are really busy right now but will be coming up for air very soon and the info you’re gathering will be useful. We want to do lots of optimizations over the coming months. The issues you’re surfacing will help us target those efforts. First on the list is to make IPNS a lot faster – a couple people are already working on that one. :wink:

If you figure out ways to reliably reproduce the slow response times, I’d say go ahead and submit a bug report on https://github.com/ipfs/go-ipfs with instructions on how to recreate the issues. That will make it easier for the committers to keep track of it, and to let you know when it’s been addressed.

@flyingzumwalt I have a suspicion why they are busy :slight_smile:

I’ll add to this post when I find out more!

1 Like

Just want to chime in and say we too are experiencing greatly varied load times when hosting on our own gateway (thought that would do the trick!) so any attention devs can pay attention to this issue are greatly appreciated. We really want to stay hosted on IPFS!!

Did that suspicion work out? Any new ideas about why load times vary so much?

My suspicion referred to why they were busy (the filecoin ICO) :slight_smile:

Load times vary because of a couple of reasons as far as I understand it:

  • how many nodes have your data (it’s like bittorrent)
  • how fast/busy is the gateway you use
  • if you use IPNS to resolve: this is slow unless cached it seems
  • … more?

i have the same problem with you. you posted it on Aug 2017, and i still face this problem in April 2018. Do you solved the problem?

I’m copy/pasting my comment from another discussion related to IPNS resolve times.

As of v0.4.14, IPNS resolution is a lot faster now when using the new pubsub IPNS resolver and publisher: https://ipfs.io/blog/34-go-ipfs-0.4.14#ipns-improvements.

1 Like