Guide to IPFS CDN: Technical Specs & Integration

Guide to IPFS CDN: Technical Specs & Integration

A comprehensive guide to Filebase's IPFS CDN capabilities, technical specifications, and step-by-step integration guide for developers.

AuthorFilebase Team
CategoryGuides

Content delivery in the Web3 space presents unique challenges. While IPFS (InterPlanetary File System) provides a revolutionary way to store data decentrally, retrieving that data quickly and reliably can sometimes be a bottleneck.

Filebase solves this with our Global IPFS CDN. By caching your IPFS content across a global network of edge locations, we ensure that your users experience low-latency, high-throughput access to your data, regardless of where they are in the world.

Technical Specifications

Our CDN is built to meet the rigorous demands of modern web applications while maintaining native compatibility with decentralized protocols.

Protocol Support

We provide full support for modern web standards to ensure compatibility with all client applications:

  • HTTP Versions: Full support for HTTP/2 and HTTP/1.1 for efficient connection multiplexing.
  • IPFS Protocols: Native support for content retrieval via Bitswap and standard HTTP Gateways.
  • WebSockets: Real-time bidirectional communication support via WSS and WS.

Performance & Caching

Speed is the core feature of any CDN. Our architecture is optimized for instant data propagation and retrieval:

  • Instant Invalidation: Cache purges propagate globally in under 100ms.
  • Smart Caching: Configurable "stale-while-revalidate" strategies ensure content is always available, even while background updates occur.
  • Custom Rules: Flexible caching rules allow you to define exactly how different types of content are handled at the edge.

Security at the Edge

Security is not an afterthought. Every Filebase Dedicated Gateway comes with enterprise-grade protection:

  • Auto HTTPS: Automatic SSL/TLS certificate management for all domains.
  • Access Controls: Token-based authentication (Bearer Tokens) and API Key restrictions.
  • DDoS Mitigation: Advanced protection against distributed denial-of-service attacks included by default.

Integration Guide

Integrating the Filebase IPFS CDN into your application is straightforward using our SDK. Follow these steps to get started.

1. Install the SDK

First, add the Filebase SDK to your project using your preferred package manager.

terminal
# Install using npm
npm install @filebase/sdk

# Or using yarn
yarn add @filebase/sdk

2. Initialize & Create Gateway

You'll need your Access Key and Secret from the Filebase Dashboard. Never expose these keys in client-side code. Always use environment variables or a secure backend service.

setup-gateway.js
import { GatewayManager } from "@filebase/sdk";

// Initialize the Gateway Manager
// SECURITY WARNING: Use environment variables for keys
const gatewayManager = new GatewayManager(
  process.env.FILEBASE_KEY,      // From Access Keys in Dashboard
  process.env.FILEBASE_SECRET    // Keep this secret secure!
);

// Create a new dedicated gateway
await gatewayManager.create('my-cdn-gateway', {
  domain: 'cdn.mydomain.com' // Optional custom domain
});

3. Serve Your Content

Once your gateway is created, you can serve content immediately. You can use the default gateway URL provided by Filebase, or your own custom domain if you configured one.

usage-example.txt
// Access content via your dedicated gateway
https://my-cdn-gateway.myfilebase.com/ipfs/QmYourContentHash...

// Or via your custom domain
https://cdn.mydomain.com/ipfs/QmYourContentHash...

Using Custom Domains

For a fully branded experience, you can map your own domain (e.g., cdn.yourproject.com) to your Filebase Gateway.

The process involves two simple steps:

  1. DNS Configuration: Add a CNAME record in your DNS provider pointing your subdomain to your gateway URL.
  2. Dashboard Setup: Add the custom domain in your Filebase Dashboard settings for the specific gateway.

We automatically handle SSL certificate generation and renewal for your custom domain, ensuring your content is always served securely.

Ready to Scale?

Filebase's IPFS CDN combines the resilience of decentralized storage with the performance of a traditional CDN. Whether you're building an NFT marketplace, a decentralized social network, or a high-traffic dApp, our infrastructure scales with you.

Log in to your dashboard to create your first Dedicated Gateway today.