What is InterPlanetary File System (IPFS)?
| — A majority of the platforms and data we have today are stored on central cloud servers owned by a few technology corporations. And these servers are prone to “downtime,” as was experienced on October 4, 2021, when Facebook, Instagram, and WhatsApp went down for hours.
— As they have a central point, governments can censor the data stored on them to manipulate the masses or hackers can attack the servers and cause irreparable damage.
— InterPlanetary File System or IPFS is a distributed storage system that does everything that central servers do but without relying on a central system. This makes it resilient to downtimes, censorship, and attacks while enabling it to lay the foundation for a decentralized internet.
— In this article, we will explore the drawbacks of using central servers to store all our data and how IPFS is effectively solving these problems.
In the age of the internet, data is everything. But where does all this data get stored? Where do our YouTube videos, Instagram photos, Wikipedia pages, and the quintillion bytes of data uploaded daily on the internet get stored?
The Current Model of Storing and Accessing Data
A majority of the data uploaded on the internet goes into huge physical facilities. These are called cloud servers that have tens of thousands of storage and computation devices stacked over one another. Most of these servers, and thus the internet, is controlled by tech giants like Google, Amazon, Microsoft, and IBM.
Anyone can pay to remotely access the storage or computation power of these servers. That’s what all Web2 platforms from our favorite content streaming platforms to social media use to store data and load web images. Here’s a step-by-step overview of how it works:
1. When you upload a file on a Web2 platform, it is stored on a centralized cloud server.
2. This storage location of that file is assigned a respective URL or Uniform Resource Locator.
3. Whenever you have to access that file, you need to enter the URL that points to the file’s location on the server.
4. The server then looks up the file and loads it on your browser.
This process of accessing files on the internet is called location-based addressing.
But there are major problems with this method of storing and accessing internet data on central servers.
The Dark Side of Central Servers
Now that you know that most of the world’s data is stored on central servers controlled by a few major corporations, ask yourself if it is really a great idea? Let alone everything, ask yourself if it is fine that all your data, your pictures, videos, and documents stored on Google Drive, website, or iCloud could be wiped if a central entity failed to keep it online?
It sure isn’t.
As recently as October 4, 2021, Facebook, Instagram, and WhatsApp went down globally for hours at length. All of a sudden, you could no longer access your messages and posts on Facebook and Instagram or download images you received on WhatsApp. That was because the “location” where all the data would be is not accessible, or, put simply, the server was down.
And downtimes are common in the Web2 space. Central servers often face issues and become inaccessible. Resulting in the URLs failing to access websites and platforms and loading it on our browsers.
Furthermore, hackers can target a central point and conduct an attack on these servers to steal data. Or, governments can easily censor internet platforms and information, like what we already see throughout the world. That is all possible because everyone knows where exactly the data is stored and where they need to target.
Good for us that times are changing and systems are becoming trustless. Meaning that we no more need to trust a third party. And leading the transition to a “trustless” model is the InterPlanetary File System, a.k.a. IPFS.
What is the InterPlanetary File System (IPFS)?
In the words of the founders of IPFS, InterPlanetary File System “is a distributed system for storing and accessing files, websites, applications, and data.” That is, it is a system that does everything that centralized clouds do but without a centralized storage system.
So, where does the data go then? The answer is in the word “distributed.”
Similar to how blockchains rely on nodes to contribute their computing power to verify data. IPFS has hundreds of thousands of nodes — individual computer systems connected to IPFS — that offer their storage bandwidth to store the files and content uploaded to the network.
That means, if Wikipedia utilizes IPFS to store its content, it would be across a distributed network instead of a central server. As long as at least one of the nodes storing a particular page is online. Users will be able to access that page by entering the link to it. The same applies for other platforms, websites, and apps.
Due to the decentralized network of nodes, it is almost impossible to guess which node stores what data on IPFS. This removes central points of failures and minimizes the chances of censorship and hacks.
Now that you have a basic idea of what IPFS is. Let’s dive deeper and understand how all of what we said falls in place and functions as one integral system.
How Does IPFS Work?
Instead of utilizing location-based addressing, where users point to the location of a file on a central server. IPFS uses content-based addressing where users request a file using a unique ID of the file.
Here’s a step-by-step overview of how uploading and accessing files and data on IPFS works:
1. When you upload a file on the IPFS network, it is divided into smaller parts and encrypted with cryptographic hashing.
2. To identify the file, the network assigns it a unique identifier called a hash or content identifier (CID).
3. Whenever you want to access this file, you can use this CID and ask the network of nodes who has the file corresponding to it. Note this difference from Web2 — you’re not pointing to a location, like you do on a central server/Web2. Instead, you’re asking for the file directly.
4. Any node that has the file on its system then sends it to you, and it loads on your browser.
5. As soon as you receive the file, your computer caches a copy of the file. Then you become another provider of that file until the time you decide to clear your cache. If you want to, you can also choose to store that copy of the content and become a permanent provider for as long as you want.
The fact that you’re accessing a file by pointing at its content and not its location is why this approach is called content-based addressing.
And every time new data is added to a file, it creates a new file with a new CID. Retaining the previous version of the file on IPFS. This means the entire history of a file can be immutably stored across IPFS.
Does it mean you have to remember complex hashes of every new version to access the files? Not really. It is possible to link the files to readable domain names on the Domain Name System. Just like we have today for regular websites, pages, and platforms.
But again, why should we be using this approach instead of just sticking to what we already have?
Why Use IPFS?
As our lives become more digitized, we need to find a more reliable place to store our data. We can no more put a few central entities in control of a majority of the world’s data. And that’s what makes IPFS the need of the hour.
The benefits of replacing centralized servers with IPFS are quite apparent. Your access to data relies not on one central point but on several computer systems supporting the network. IPFS offers us a storage system that is not only immutable due to its decentralized nature. It also makes all the data accessible 24×7 without fail.
If you’ve ever been unable to access data due to censorship, then that too ends with the usage of the distributed storage system that is IPFS. Further, IPFS takes away the unprecedented control that tech behemoths have today over the internet and distributes it among the users of the network. Above all, it creates a more democratic internet that is more user-centric and resilient to manipulation.
IPFS and NFTs
So, now you understand that IPFS is great for storing data in a decentralized way. But did you know data can include all sorts of things like images or videos? For this reason, IPFS is often used for storing the image, audio or video files for NFTs. To explain, most of the data for NFTs is not stored directly on chain. On most blockchains, storing data that way is too impractical and cost-inefficient. Instead, most NFTs include a link or a direction to a decentralized storage source, and often it’s IPFS.
In short, IPFS is the perfect place to store the image of your decentralized NFT collection to save storage issues on a blockchain network.
Advancing Toward the Future of Web and Data Storage
Around 10 to 15 years ago, data was not such a big concern. If you recall, all that you may have been using are an email service, an eCommerce store, and, maybe, a social media platform. Today, things have changed. We live half our lives on the internet, and you can reflect upon the internet’s importance based on how you panic when you cannot access the online world when the “server is down.”
And IPFS is that solution that makes sure you enjoy access to your favorite platforms, your birthday photos from the past, your emails, your chats, and everything else online at all times. It brings you and every individual the promise of securing humanity’s critical data through the power of decentralization.
Knowledge is Power.
Trust yourself and keep on learning! If you enjoy getting to grips with crypto and blockchain, check out our School of Block video all about Web 3.0.