CDN and caching
Filebase operates its own global content delivery network. Every public-bucket request is served through edge locations close to your users — popular objects come back from cache in milliseconds, and origin reads to the underlying object store stay rare even under heavy load.
How it works
When a client requests a public-bucket object:
- The request lands at the nearest edge location.
- If the edge has a fresh copy, it returns immediately. The origin is not contacted.
- If the edge doesn't have a copy (cache miss), it fetches from the origin, returns to the client, and caches the response for subsequent requests.
- Cached objects are evicted on a least-recently-used basis as new content replaces them.
This is transparent to your code. Your application uploads via the S3 API; readers see CDN-accelerated responses without any extra configuration.
What gets cached
- Public bucket objects — yes, aggressively.
- Private bucket objects accessed via the S3 API — no. Authenticated requests bypass the edge cache and hit the origin every time.
- Pre-signed URL responses — vary; the cache key includes the signature, so distinct pre-signed URLs for the same object are cached separately. For high-traffic distribution prefer a public bucket.
Cache headers
Filebase respects standard HTTP caching headers on objects you upload:
Cache-Control— sets max-age and revalidation behavior. Recommended for static assets:for hashed filenames, or:Cache-Control: public, max-age=31536000, immutablefor content that may change.Cache-Control: public, max-age=300Content-Type— affects content-encoding negotiation at the edge.Content-Encoding— Filebase does not transcode; if you serve gzip or Brotli, set this header at upload time.
Set headers when uploading:
aws --endpoint https://s3.filebase.io s3 cp index.html s3://my-site/ \
--content-type "text/html" \
--cache-control "public, max-age=300"
await s3.send(new PutObjectCommand({
Bucket: 'my-site',
Key: 'index.html',
Body: html,
ContentType: 'text/html',
CacheControl: 'public, max-age=300',
}));
Invalidating cached content
Today, the simplest way to invalidate an object at the edge is to upload a new version under the same key — Filebase invalidates the edge cache when an object is overwritten.
For workflows that absolutely require atomic deploys with cache busting, use content-hashed filenames (assets/app.a3f9d2.js) and reference the hash from your HTML. This is the same pattern most modern build tools (Vite, webpack, esbuild) apply by default.
CORS and the CDN
CORS preflight responses are cached at the edge per the rules in your bucket's CORS configuration. See configure CORS.
Bandwidth
Outbound bandwidth from the CDN is free of charge on every paid plan. Bandwidth limits on the free tier are described in the pricing page.
What's next
- Bandwidth
- Public vs. private buckets
- Host a public website
- CloudFront, Fastly, and Bunny CDN integrations — if you want to layer an additional CDN in front of a public bucket