When most people open a browser, they never have to think about how the page arrives. Type a URL, hit enter — boom. But what happens if the server is down? What if you want a web that isn’t so dependent on a single company? That’s exactly what IPFS, the InterPlanetary File System, sets out to solve.
I recently spent some time digging into IPFS to understand its guts and its differences from HTTP. Here’s what I learned — hopefully you’ll come away with a better sense of what IPFS is, how it works, and why it’s an exciting alternative for hosting content on the web.
HTTP: The Client-Server Model
First, let’s quickly revisit the traditional web.
When you visit https://example.com, your browser asks the Domain Name System (DNS) for the server’s IP address and then sends an HTTP request to that server. It’s a client-server model — one central host is responsible for delivering the files. If that server is slow or goes down, the page is unavailable. Even with Cloudflare or other CDNs providing a safety net, you’re still locked into the provider’s architecture.
And if you switch hosting companies? You often have to re-upload all your assets or reconfigure your setup. That’s a form of vendor lock-in — most cloud solutions are proprietary and not interoperable across different ecosystems.
IPFS: A Peer-to-Peer Web
IPFS is a different way of thinking about the web.
First off, IPFS is a communication protocol, not a “host.” Running IPFS software — like the official IPFS Desktop client — makes your computer part of a distributed network of peers. Instead of contacting one central server for data, you can ask any peer for it. Every peer can serve content and request content at the same time.
This is a classic peer-to-peer setup: if someone on the network has the data you need, they can send it. No single server is a point of failure.
💭 Quick observation:
Many people don’t realize peer-to-peer networks already run things like BitTorrent — IPFS takes this same idea and applies it to the entire web.
Tools like web3.storage or Pinata offer pinning services so that even if your laptop is offline, your files stay accessible on the network.
Content Addressing & CIDs
In HTTP, we use a location to find content: (https://example.com/image.png).
In IPFS, we use a hash that uniquely identifies the content itself.
Here’s what happens under the hood when you add a file to IPFS:
# Adding a file to IPFS
ipfs add cat.png
You'll get back something like:
added QmXn...abcdef cat.png
That string (QmXn…abcdef) is called a Content Identifier (CID). The CID is derived from the file’s content — if you change even one pixel in the image, the CID will also change. That’s called content addressing and it’s what makes IPFS resilient. Even if the file is replicated across a hundred machines, they all recognize it by its hash.
Merkle DAGs & Distributed Hash Tables (DHTs)
When you add a file, IPFS actually splits it into small chunks — often around 256 KB — then hashes each chunk separately. Finally, those chunks are linked together into a structure called a Merkle Directed Acyclic Graph (DAG). It’s like a tree where the leaves are chunks and the branches are links.
Why go to this trouble?
If someone else on the network already has a chunk that matches one of yours, IPFS can re-use it — saving bandwidth and storage.
When a node announces that it has a CID, that mapping is published to a Distributed Hash Table (DHT) — like a distributed index of what’s stored where. When you request a file:
- IPFS looks up the CID in the DHT.
- Finds peers with that data.
- Fetches chunks peer-by-peer.
This is the true peer-to-peer magic - any node can jump in and contribute chunks of the file.
Gateways: Bridging IPFS and HTTP
You might wonder — what if my browser doesn’t understand ipfs:// links? That’s where IPFS gateways come in.
Gateways translate HTTP to IPFS. For example, to view a file with a public gateway:https://ipfs.io/ipfs/QmXn...abcdef
This is super handy for browsers and tools like curl or wget that only speak HTTP.
And if you’re building an app, you can do the same in your code. Here’s a quick React snippet that renders an image hosted on IPFS:
import { useEffect, useState } from "react";
export default function IPFSImage({ cid }) {
const [src, setSrc] = useState("");
useEffect(() => {
setSrc(`https://ipfs.io/ipfs/${cid}`);
}, [cid]);
return <img src={src} alt="IPFS-hosted image" className="rounded-xl" />;
}
Pinning and Persistence
IPFS is distributed, so content only stays available as long as someone is hosting it.
That’s where pinning comes in: you choose files that must persist forever on your node.
When you “pin” a file (ipfs pin add QmXn...abcdef), your node will keep serving that content and never garbage-collect it.
For production apps, you can also use pinning services like web3.storage or Pinata — they do the hard work of keeping your files online 24/7.
Why This Matters
IPFS is still an evolving technology, but it’s already being adopted for real-world use
- Storing decentralized websites and assets.
- Hosting NFTs so they can’t disappear.
- Reducing bandwidth by deduplicating chunks across the network.
- Giving users control over their data instead of locking it into a single provider.
And with tools like IPFS Desktop and HTTP gateways, it’s becoming easier to use every day.
Conclusion
IPFS is more than just a protocol — it’s a new way of thinking about how we store, share, and access data online. By focusing on content addressing, peer‑to‑peer connections, and a resilient distributed network, IPFS gives us a glimpse of a more open, accessible, and trustworthy internet.
Whether you’re a developer looking to build the next decentralized app, a company seeking to reduce reliance on traditional servers, or simply someone interested in understanding the future of the web, IPFS is worth exploring. Its benefits — from improved reliability and availability to reduced vendor lock‑in — make it a compelling piece of the web’s evolution.
With IPFS, files live closer to where they’re needed, making the internet a collaborative space where every node can be both a consumer and a contributor. It’s an exciting shift, and it’s happening right now.


