Blog home

What is an IPFS node?

Steve

Published on

3 min read

What is an IPFS node?

Uncover the core of IPFS: nodes. Delve into their functions, the choice between self-hosting and pinning services, and optimize your decentralized sharing.

If you’re diving into Web3 then you have likely heard of IPFS, and in that mix, you have probably seen the term “IPFS node.” These distributed IPFS nodes are at the core of what makes the network run, and understanding how they work and what they do will greatly help your journey into off-chain storage solutions and if you should run your own or use a service.

How Does IPFS Work?

IPFS is a distributed file-sharing system compared to the normal file-sharing protocol HTTP. With regular websites that you normally visit, there’s a two-way connection made between your computer and the service that is hosting that website. The computer makes a request to see a website page, the hosting services send the web page. With IPFS there are multiple directions the request is being made, so when you request to see a file by referencing its content identifier (CID), it will fetch blocks of the file from multiple IPFS nodes that have the content as they share the data collectively.

What Does an IPFS Node Do?

IPFS nodes are what the IPFS network is made of; a collection of computers or servers sharing data between each other, and they serve multiple important functions. The first thing they do is “pin” content to the network. This process involves taking a file, breaking it down into chunks, and making a cryptographic hash called the CID. The CID will serve as the address of the file, and when other IPFS nodes ask for that CID, pieces of that content will be cached on the other nodes it passes through. As a piece of content is requested more and more, the bigger that cache layer will be.

What makes nodes powerful is their ability to work and talk with one another. An IPFS node can pin a CID that another node has already pinned, making it more resilient and harder to take down. A good comparison is putting a picture on a fridge and using a magnet to hold it in place. If I place another magnet on the same picture, then remove the first one, the picture stays up. IPFS Nodes can also broadcast their content to the Distributed Hash Table (aka the DHT), or network indexers which is like having someone on speed dial rather than searching for their number through a phonebook, making the content much more available and faster to fetch.

Self-Hosted Nodes vs. IPFS Pinning Service

If you want to run your own simple IPFS node and pin something to it you can do that! (Check out this post for more info). While running IPFS Desktop is pretty simple, there are some downsides to making this a viable solution for hosting content. A big one is that your IPFS node would need to be running 24/7 in order to be reliable because if your computer is turned off and your node is the only one pinning a CID, the other nodes are not going to know where to fetch the blocks from. If you switch from a computer to using a server to run a self-hosted IPFS node, there are often problems with scaling and making it reliable.

Another option for hosting on IPFS nodes is using an IPFS Pinning Service like Pinata. In this instance, the content is pinned on a large global network of IPFS nodes rather than just a single node. This makes it easier to fetch that content and creates the cache layer spoken of earlier. Pinata has been running globally scalable IPFS nodes since 2018, so we’ve built up a wealth of knowledge and experience in optimizing them and making them reliable, including upgrades like broadcasting pins to the DHT.

All in all, understanding IPFS and what makes it run can help you make the right decision when it comes to choosing off-chain storage solutions. If you choose to use a pinning service, you can check out Pinata here.

Happy pinning!

Stay up to date

Join our newsletter for the latest stories & product updates from the Pinata community.

No spam, notifications only about new products, updates and freebies. You can always unsubscribe.