I have a problem understanding why IPFS behave in a specific way in the following scenario:
I have two nodes - js-ipfs webapp and go-ipfs daemon running.
I’m adding a photo file using the webapp - no problem here.
I then try to use the
cat command to get the photo using the go-ipfs node, I’ve try both HTTP API endpoint and command line, both behave in the same way - they get stuck.
When I use gateway.ipfs.io to ask for the same hash I get the photo file between 5s - 50s.
Once the gateway returns the photo file I can then ask the same hash from the daemon and now it returns it instantly.
There is a discussion about this with the exact same topic as this (because I’ve copied the discussion title of course).
In the discussion they talk about opening firewalls, in my usecase I can’t expect anyone to open any firewalls because the end users will use the app from anywhere, including their home network and they should not have to touch anything related to firewalls.
Why is the gateway nodes are able to retrieve the content while the go-ipfs node doesn’t?