blockchainsv
Developer Tools & Infrastructure·August 07, 2026·15 min read

IPFS Gateways vs Pinning Services: Key Differences

A dApp can upload a file to IPFS successfully and still lose it later. That uncomfortable gap is where many production architectures go wrong: the team tests an NFT image, metadata object, or…

IPFS Gateways vs Pinning Services: Key Differences

A dApp can upload a file to IPFS successfully and still lose it later. That uncomfortable gap is where many production architectures go wrong: the team tests an NFT image, metadata object, or frontend asset through a public gateway, sees a valid CID, and assumes the storage problem is solved. It is not.

The distinction between an IPFS gateway and a pinning service is operational, not cosmetic. A pinning service helps keep content available on the network. A gateway helps an application retrieve that content over HTTP. One deals with persistence; the other deals with access. In a production dApp, we usually need both.

If we are comparing an IPFS gateway vs. pinning service for dApps, the useful question is not which one is "better." The useful question is where each belongs in the user journey, what can fail, and how gracefully the application behaves when a provider is slow, rate-limited, or unavailable.

The mechanics of data persistence: pinning versus garbage collection

IPFS addresses data by its content, using a CID rather than a conventional server path. The CID is derived from the content, so changing a file produces a different identifier. That gives us verifiable addressing, but it does not guarantee that the bytes will remain available forever.

An IPFS node stores blocks locally. When storage pressure appears, nodes may run garbage collection and remove blocks that are not pinned. A block that was fetched once, or uploaded to a local node without a persistence strategy, can eventually disappear from that node. If no other node is serving the same content, the CID remains known while the data becomes difficult or impossible to retrieve.

Pinning is the mechanism that tells a node: keep these blocks. A pinning service runs infrastructure that retains the content associated with selected CIDs and keeps those blocks ineligible for garbage collection on its always-on nodes. The service may also replicate the data or expose additional storage backends, depending on its architecture.

A gateway does not perform that job merely because it can retrieve a CID.

When a browser requests an address such as an IPFS path through an HTTP gateway, the gateway acts as a bridge between familiar web requests and the content-addressed IPFS network. It may fetch the blocks from its own cache, from connected peers, or from another storage layer. That is useful for delivery, but the gateway request itself should not be treated as a durable storage contract.

A gateway answers "how do I retrieve this CID?" A pinning service answers "why should this CID still be available next month?"

This difference matters for every common dApp asset:

  • NFT metadata and media files referenced by token URIs.
  • User-uploaded profile images and documents.
  • Static frontend bundles deployed to IPFS.
  • JSON configuration consumed by a client application.
  • Governance proposals or community content that must remain readable after publication.
  • Build artifacts used by a decentralized interface.

For IPFS storage for smart contracts, the separation is particularly important. A contract can store or emit a CID, but the EVM does not store the corresponding image, JSON document, or binary asset. The contract preserves the reference. The IPFS infrastructure must preserve and serve the content behind it. We have seen contracts point to a perfectly valid ipfs:// URI while the actual image loads as a broken icon, simply because the metadata file was never durably pinned or the pin was removed when a free-tier account expired.

What pinning does and does not guarantee

Pinning gives us a practical persistence layer, but it is not a magic permanence button. We still need to understand the provider's retention policy, account status, replication model, export options, and incident handling.

A pinning service can ensure that content is retained on its managed infrastructure. It cannot prevent us from deleting the pin, losing access to an account, exhausting a quota, or publishing an incorrect CID in the first place. If a production deployment pins the wrong metadata or replaces a file under a new CID without updating the application flow, the data may be technically available while the user experience is still broken.

For critical assets, we should preserve the original content and the pin manifest independently of the provider. The CID is portable, and the IPFS Pinning Service API makes programmatic management more practical across implementations. But portability only helps if we have a process for exporting content, recreating pins, and validating the result.

A practical failure we keep running into: a team pins a metadata folder, then mutates a referenced media file weeks later under the same logical name. The folder gets a new CID because IPFS is content-addressed, but the contract still points at the old CID. Pinning the new file does not fix the broken reference. Immutability of the CID is the feature; it is also the trap.

The IPFS Pinning Service API: a useful boundary between application and vendor

Provider-specific SDKs are convenient during the first afternoon of a project. They become less comfortable when a dApp reaches production and the team needs to move data, add a second provider, or rotate credentials without rewriting the upload pipeline.

The IPFS Pinning Service API v1.0.0 provides an implementation-agnostic OpenAPI specification for managing pins programmatically. It uses JWT token authentication and gives applications a standardized interface for operations such as creating, listing, and removing pin requests.

The value here is not that every provider behaves identically. They do not. The value is that our application can treat pin management as an infrastructure boundary rather than scattering vendor-specific calls throughout frontend code, backend jobs, and deployment scripts.

A sensible integration usually keeps the responsibilities separate:

1. The application creates or receives the content.

This may happen in a backend upload service, a deployment pipeline, or a controlled worker rather than directly in the browser.

2. The storage adapter uploads the content and records the CID.

The adapter can use the provider's API while exposing a project-specific interface to the rest of the system.

3. The pin manager submits and tracks the pin request.

A successful upload response is not necessarily the same thing as confirmed persistence. We should track the pin state and preserve the CID.

4. The verification job retrieves the content through an independent path.

Fetching the CID from the same provider that accepted the upload can hide provider-local failures. A second gateway or node gives us a better check.

5. The deployment process publishes only validated references.

For NFT metadata or contract configuration, the CID should enter the on-chain or application-visible state after the content is retrievable and its hash matches the expected artifact.

The API standard reached version 1.0.0 in 2020. It is a useful stable boundary, but we should not confuse standardization with active, rapid feature development. The specification has been effectively ossified since 2022, so provider capabilities can still differ around multipart uploads, file size handling, metadata, billing, replication, and status reporting.

Why the adapter layer matters

Suppose a frontend calls a provider SDK directly to upload an image, receives a CID, and writes that CID into a contract transaction. This looks efficient. It also couples a user-facing action to several infrastructure assumptions:

  • The user's browser can reach the provider.
  • The provider accepts the file format and size.
  • The authentication model is safe for a client environment.
  • The upload completes before the wallet transaction is submitted.
  • The CID is pinned rather than temporarily staged.
  • The gateway used for preview can retrieve the content.
  • The content will remain available after the provider's free quota is exhausted.

A backend or worker-based adapter lets us handle those assumptions deliberately. It can enforce file limits, scan input, retry requests, record pin status, and return a stable application response. The user journey still needs a progress state, but at least we are debugging one integration boundary instead of asking a browser to perform storage orchestration, wallet interaction, and content verification at once.

That is where graceful degradation begins. If the pinning request is delayed, the UI can show "upload processing" without pretending that the asset is already permanent. If the gateway is unavailable, the application can offer another retrieval path. Honest intermediate states are much kinder than a broken image that looks like a blockchain failure.

The gateway dilemma: public access versus production delivery

Public IPFS gateways are attractive because they remove setup. A browser can request content through a familiar HTTP URL, and a developer can inspect a CID without running a node or configuring a dedicated endpoint.

They are also shared infrastructure. Public gateways serve many applications, face congestion, and enforce rate limits. That makes them useful for development, debugging, and occasional inspection, but risky as the only delivery layer for a production dApp.

A frontend that renders every NFT image through a public gateway can encounter several failure modes:

  • Requests are throttled during a traffic spike.
  • The gateway is slow to discover or fetch a cold block.
  • A browser hits a rate limit while the application is loading a collection.
  • A gateway returns an error for a request format it does not support.
  • A cached response is stale or absent.
  • The gateway is operationally healthy, but the underlying CID was never pinned.

HTTP status codes can make these failures look deceptively familiar. A gateway may return 406 Not Acceptable when the requested representation or format is unsupported. A 304 Not Modified response can indicate that the cached content still matches the supplied ETag, which is normal browser behavior rather than a storage failure. Neither response tells us whether the asset is durably pinned.

For a production dApp, a dedicated gateway is usually the more predictable choice. It gives the application a controlled retrieval endpoint, clearer quotas, and an operational relationship with the provider. A self-hosted node or gateway can offer more control, although it also shifts maintenance, monitoring, peering, storage, and incident response onto our team.

A dedicated endpoint does not remove the need for pinning. It improves the path from the user to the content. It does not automatically ensure that the content exists.

Storage and retrieval should be modeled as separate dependencies

The cleanest architecture treats the two services as independent but connected:

LayerPrimary responsibilityTypical failureWhat it does not guarantee
Pinning serviceRetain blocks associated with selected CIDsPin request fails, quota is exhausted, account or provider is unavailableFast browser delivery
IPFS gatewayTranslate HTTP requests into IPFS retrievalRate limits, congestion, cache misses, unsupported request formatPermanent storage
Self-hosted IPFS nodeStore, retrieve, and optionally serve content under our controlNode failure, insufficient disk, weak peering, maintenance gapsMulti-region availability by itself
Application backendOrchestrate uploads, validation, pin tracking, and fallbacksQueue failures, bad retry logic, lost metadataDecentralized persistence
Smart contractStore references, ownership, or state transitions on-chainTransaction failure, incorrect URI, immutable bad referenceOff-chain asset availability

This model prevents a common category error: selecting a gateway because the team needs storage, or selecting a pinning service because the team needs low-latency HTTP delivery.

The "Pinata versus Infura IPFS" question

Comparisons such as Pinata vs. Infura IPFS often mix different product layers. A team may compare upload APIs, gateway URLs, authentication, quotas, and reliability as though all of those features represent the same thing. They do not.

When evaluating providers, we should first map the actual workflow:

  • Where is content uploaded?
  • Where is the pin request created?
  • Which endpoint serves the browser?
  • Can the content be retrieved through another gateway?
  • How are credentials kept out of the frontend?
  • What happens after the free storage or bandwidth allowance is consumed?
  • Can we export the data and recreate pins elsewhere?

Pinata, Filebase, Storacha, and other services may expose overlapping functionality, but their storage models, gateway arrangements, APIs, free tiers, and operational guarantees differ. The right comparison is therefore not only "which provider has the lowest price?" It is "which provider fits our persistence, delivery, migration, and monitoring requirements?"

A useful heuristic when reading a provider's marketing page is to ignore the headline pricing number entirely for a moment. Look instead at what happens when a single API call fails, when a webhook is missed, or when the team needs to leave. The answer to those questions tells us more about long-term operational risk than any benchmark.

Trustless retrieval: when the gateway should not be the source of truth

Traditional gateway access asks us to trust the gateway to return the content represented by a CID. In many cases, the content can still be verified by the client after retrieval, but the delivery path is designed around a normal HTTP response.

Trustless Gateways extend the Path Gateway Specification with retrieval patterns that allow a light client to request raw blocks or CAR streams and verify data integrity locally. The gateway supplies the bytes; the client checks that those bytes correspond to the requested content-addressed data.

This is a meaningful change in the trust model. We are no longer asking the gateway operator to be the final authority on whether the response matches the CID. The client can validate the block structure and content-addressed identity itself.

That does not make every gateway issue disappear. Verification cannot compensate for a missing pin, poor availability, rate limiting, or an unusable client implementation. A trustless gateway can return verifiable failure just as reliably as verifiable data. But for applications handling sensitive content or relying on stronger integrity guarantees, local verification reduces the amount of trust placed in the retrieval provider.

Trustless does not mean frictionless

There is a practical UX trade-off here. Standard browser retrieval through an HTTP gateway is familiar and easy to integrate. Raw block and CAR retrieval may require additional client logic, parsing, validation, and memory management. For a gallery with thousands of assets, we need to understand how verification affects loading behavior and whether the browser can process the selected representation without introducing visible latency.

We should also decide where verification belongs:

  • In the browser, when the client must independently validate content.
  • In a backend worker, before content enters a cache or indexing pipeline.
  • In both places, when the application has a high-integrity requirement.
  • At neither layer for low-risk static assets where the gateway and CID model already meet the product's needs.

The answer depends on the asset, not on a general claim that one retrieval mode is always superior.

A pragmatic pattern we have used is to verify in a worker at index time, then serve the validated CID through a regular gateway to the browser. The end user gets familiar HTTP semantics; the application gets the integrity check at the boundary where errors are still cheap to handle.

Choosing infrastructure: redundancy, cost, and the user journey

The best IPFS pinning service for Web3 is rarely the one with the most impressive feature list. It is the one that gives the team a workable answer to persistence, delivery, migration, and incident response.

Free tiers are useful for prototypes, internal tools, and early testing. The available allowances vary. For example, Pinata's free tier includes 1 GB of storage and 10 GB of bandwidth, while Filebase and Storacha offer 5 GB of free storage. Those numbers can be enough to test a collection or deployment workflow, but they are not an architecture.

A team should model both sides of the traffic:

  • Storage growth: how many new bytes are pinned each month?
  • Retrieval traffic: how often are those bytes requested?
  • Asset shape: many small JSON objects behave differently from large media files.
  • Hot and cold content: popular assets create gateway pressure even when total storage is modest.
  • Replication: does the provider retain data in one system or across multiple networks?
  • Migration: can we retrieve content and re-pin it without a proprietary export step, and does the cost model stay sane on the way out?
Pick the provider you can leave, not just the one that is cheapest to stay with.

That last point tends to be ignored until it is urgent. A provider that exposes every pin behind a custom authentication scheme, charges per egress, or holds content in a non-IPFS-compatible backend can quietly lock a team in. The CID is portable; the operational path out of the vendor is not always portable.

A redundancy story belongs in the same conversation. A single pinning provider is a single point of failure, even if the provider is excellent. Common patterns include:

  • Pinning to a primary provider and mirroring to a secondary one for resilience.
  • Running a self-hosted IPFS node alongside a managed service for critical assets.
  • Using a dedicated gateway backed by a separate retrieval path that does not depend on the same vendor.

None of these are free. The right combination depends on what the dApp actually loses when an asset disappears. An unrecoverable governance document, a frozen frontend bundle, and a stale profile picture have very different business consequences, and they should not all sit behind the same architecture.

The gateway choice mirrors the same logic. A production dApp usually benefits from a dedicated retrieval endpoint with predictable latency and a public gateway as a fallback for occasional reads, shareable links, and debugging. Treating both layers as first-class infrastructure dependencies, rather than as interchangeable acronyms in a stack diagram, is what separates a dApp that survives provider outages from one that goes dark with them.

FAQ

What is the difference between an IPFS gateway and a pinning service?
A pinning service ensures content is retained and protected from garbage collection on the network, while a gateway acts as a bridge to retrieve that content over HTTP.
Why does my NFT image disappear even if the CID is valid?
The CID only identifies the content, but if the data was not durably pinned, the IPFS node may have removed the blocks during garbage collection to free up storage space.
Can I use a public gateway for my production dApp?
Public gateways are intended for development and debugging; they are shared infrastructure that can be slow, rate-limited, or unavailable, making them unreliable for production delivery.
What is the purpose of the IPFS Pinning Service API?
It provides an implementation-agnostic standard for managing pins programmatically, allowing developers to switch providers or manage multiple services without rewriting their entire upload pipeline.
Does pinning guarantee that my data will be available forever?
No, pinning is not a guarantee of permanence. It depends on the provider's retention policy, your account status, and your ability to manage pins and avoid issues like quota exhaustion.

By Chloe Redfern