The IPFS Gateway Problem

A Bottleneck Between Web2 and Web3

Matt Ober
Matt Ober
Feb 7, 2019 · 7 min read
Image for post
Image for post

What are IPFS Gateways?

IPFS gateways are how web users retrieve content on the IPFS network without running their own IPFS node. Gateways allow web clients to ask for content that resides on the IPFS network.

Gateways provide a stop-gap between Web2 and Web3.

Without using an IPFS gateway, the only way to access content on the IPFS network is by running your own IPFS node. Unless you have an application that natively runs an IPFS node for every user, applications using IPFS will point users to a gateway when they need to retrieve content on IPFS.

Why Are Gateways a Problem?

When an IPFS node retrieves content, that content is temporarily cached on the receiving node. As more nodes request that content, the speed at which that content can be retrieved increases dramatically. Unfortunately, IPFS gateways negate this benefit. When using a gateway to retrieve content, a significant delay gets introduced to the IPFS retrieval process.

Image for post
Image for post

With Local IPFS Node

In the first scenario, the user has their own IPFS node locally running on their computer. When the user requests a piece of content from the IPFS network, their node will be able to retrieve that content quickly as their node is in the same city as the node hosting the content. Great!

With a Gateway

In the second scenario, the user doesn’t have their own IPFS node running locally. Instead, the user has to ask the gateway to find a piece of content for them. That gateway will then retrieve the piece of content from whatever node is closest to it and then that content will be sent back to the user.

By utilizing a gateway to retrieve content on IPFS, we’re recreating the same Web2 architecture that IPFS aims to disrupt.

Except, instead of the data being directly on the server we’re talking to, the gateway has to first retrieve the content from the IPFS network before serving it back to the user.

Image for post
Image for post

Tragedy of the Common Gateway

Pinata, like many projects in the IPFS ecosystem, hosts a public IPFS gateway. We primarily do this for two reasons:

  1. Hosting our own gateway helps the IPFS ecosystem as a whole.

As a gateway increases capabilities, it’s more likely that the gateway will be utilized by the IPFS network.

A prime example of this is the Cloudflare gateway which recently banned video streaming. It is unknown why Cloudflare took the content down. However, it’s apparent that Cloudflare’s public gateway was generating enough traffic that it became a problem. Such a problem provides an interesting question:

How do you ensure that a public IPFS gateway continues to run without issue?

To maintain reliable service to users, you have to bulk up the gateway to keep up with demand. However, it becomes unsustainable long-term for companies providing the service to subsidize the whole network. If you run the “best” public gateway, you’re enticing public users to choose your gateway over somebody else’s. More users who aren’t paying for the gateway means more overhead. More overhead requires more resources. Pretty soon you’re experiencing a classic case of “Tragedy of the commons”.

The Ideal Web Without IPFS Gateways

The ideal solution to the gateway problem is pretty simple. Users need to run their own nodes instead of relying on public gateways. However, making that solution a reality is incredibly difficult.

Major browser support will be necessary for IPFS to truly succeed as a web protocol.

Major web browser support will hide IPFS from the end user while still providing the benefits of a p2p web experience in an optimized manner. Because IPFS is still a young protocol, major browser support will take time. However, it’s still something that needs to be strived for if we want to utilize IPFS to its full potential.


IPFS gateways are a bridge for the adoption and usability of IPFS. Unfortunately, IPFS gateways also negate some of the main benefits IPFS solves for. Primarily, gateways prevent users from benefiting from the peer to peer nature of IPFS.


The Easiest Way to Use IPFS

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store