Skip to navigation

CDN

A CDN (content delivery network) is a set of servers around the world that keep copies of your files close to your visitors. IBEE CDN lets you put a distribution in front of a public Object Storage bucket: visitors download from the nearest CDN server instead of from the bucket, so pages load faster and the bucket handles fewer requests. Each distribution gets its own address, such as https://dl-abc123.cdn.ibee.ai, with HTTPS included.

When to use the CDN

You want to…UseNotes
Serve images, CSS, JavaScript, fonts, video or downloads to many visitors, fastCDN (this page)Files are cached close to visitors
Serve files from a bucket with no cachingThe bucket’s Public Access URLSimpler; every request goes to the bucket
Share one private file for a limited timeA presigned URLThe CDN serves public files only
Spread traffic across your app serversA load balancerThe CDN doesn’t run your app code
Host a static website or single-page app from a bucketCDN with Enable SPA turned onSee Single-page apps

How it works

  1. You create a distribution for a public bucket and pick a cache policy. IBEE gives it an address under cdn.ibee.ai.
  2. The first visitor to ask for a file is a miss: the CDN fetches the file from the bucket, sends it, and keeps a copy.
  3. Later visitors get the cached copy (a hit) until the copy expires or you purge it. How long a copy is kept is its TTL (time to live).
  4. Browsers always check back with the CDN before reusing a file they have, so after you purge, visitors get the new version on their next request.

Before you begin

  • A verified organization. Until it’s verified, the portal shows Verify Identity instead of Create CDN. See Verify your identity.
  • A bucket with Public Access turned on. Private buckets can’t be CDN origins; the bucket picker marks them Private. See Bucket policies → Public Access.
  • Room in your plan. Your plan sets how many distributions you can have. See Limits and quotas.
  • For your own domain: access to your domain’s DNS settings. Custom domains are billed as an add-on.
  • For the API: an API token with CDN permission (cdn.read, cdn.write) and your workspace ID.

Create a distribution

1

Open CDN

In the sidebar, under Network & Security, click CDN. The CDN Distributions page opens. With no distributions yet, it shows “No CDN Distributions”.

2

Open the create dialog

Click Create CDN. The Create CDN Distribution dialog opens: “Configure origin and caching”.

3

Name it and pick the bucket

Enter a Name (1–128 characters, for example my-cdn-distribution). Under Origin Type, keep Object Storage Bucket and choose your bucket from Select a bucket.

4

Choose a cache policy

Pick a Cache Policy. Static Assets is the default. See Cache policies for how long each one keeps files.

5

Create

Click Create Distribution. You see “CDN Distribution created successfully”, and the distribution appears in the list with its CDN URL.

The dialog also offers Custom Origin (“Use any external HTTPS website or server”), but creating a distribution with a custom origin doesn’t work at the moment. Use an Object Storage bucket.

Each bucket can have one distribution. Custom domains are added after creation, from the distribution’s page.

Cache policies

The cache policy sets two things: how long the CDN keeps a copy (the TTL), and what it tells browsers. It replaces any Cache-Control header stored on your objects.

PolicyAPI valueCDN keeps a copy forBrowser behaviorBest for
Static Assets (default)static-assets1 year (31,536,000 seconds)Checks with the CDN before each reuseImages, fonts, CSS, JS
Media Filesmedia30 days (2,592,000 seconds)Checks with the CDN before each reuseVideo and audio
Short Cacheshort1 hour (3,600 seconds)Checks with the CDN before each reuseFiles that change often
No Cacheno-cacheNot cachedDoesn’t store the fileContent that must always be fresh

When you replace or delete a file in the bucket, IBEE queues a purge of the CDN’s copy automatically. If visitors still get the old version, purge it yourself.

To change the policy later, use the API (PATCH /cdn/distributions/DISTRIBUTION-ID with cache_policy). The portal has no edit option.

Verify

  1. In the list, the distribution’s Status shows active when it’s ready (deploying while IBEE sets it up, failed if setup failed).

  2. Copy the CDN URL and request a file you know is in the bucket:

    curl -I https://dl-abc123.cdn.ibee.ai/images/logo.png

    The first line should show status 200. Use the object’s key (its path in the bucket) after the address.

  3. To see hits and misses, open the distribution and click the Metrics tab. Cache hit rate and the Cache statuses breakdown (hit, miss, bypass, dynamic) show how much traffic came from the cache. Data for the latest hours can still be processing; the tab says so.

Custom domains

Serve files from your own address, such as cdn.example.com, instead of dl-abc123.cdn.ibee.ai. The certificate is issued automatically.

1

Point your DNS at the CDN

At your DNS provider, create a CNAME record from your subdomain to cname.cdn.ibee.ai:

TypeNameTarget
CNAMEcdn (for cdn.example.com)cname.cdn.ibee.ai
2

Add the domain

Open the distribution and click Add Domain. In Add Custom Domain, enter the subdomain you pointed at cname.cdn.ibee.ai, then click Add Domain. The portal first checks with billing that the add-on is allowed; if it isn’t, an error explains why.

3

Add any extra records and wait

The domain card shows Pending while IBEE checks the domain over HTTP and issues the certificate, usually 5–15 minutes and up to 1 hour. If the card lists extra TXT or CNAME records, add them at your DNS provider too. Click Verify on the card to check again (after validation, the button becomes Check Status). When the card shows Active, the domain serves your files over HTTPS.

To remove a domain, click the delete icon on its card. It’s removed straight away, without a confirmation step. Then delete the CNAME record at your DNS provider.

Purge cached content

Purging deletes the CDN’s copies, so the next request fetches the file from the bucket again. Open the distribution and click Purge CDN. In Custom Purge, choose what to purge:

Purge byMatchesEntries per purge
URLExact paths or full URLs, for example /images/logo.pngUp to 30
HostnameEverything under the hostnames you listUp to 100
TagFiles served with a matching Cache-Tag response headerUp to 100
PrefixEverything under a folder, for example /images/Up to 100
Purge EverythingEvery cached file of this distribution—

Separate entries with commas or put one per line. Purge Everything needs the box “Yes, I understand. Purge all cached content.” ticked. After a full purge, every file is a miss once, so the bucket gets more requests for a while.

Single-page apps

A single-page app (SPA) is a website, such as a React or Vue app, where one index.html handles every page address. On the distribution’s Overview tab, the Single-page application (SPA) card makes the CDN serve index.html for page addresses, so deep links such as /dashboard/settings load your app. Tick Enable SPA and click Save; untick it and save to turn it off. Requests for missing files still return 404.

Delete a distribution

Deleting a distribution can’t be undone. Its CDN URL stops working; a new distribution gets a different one. Move your DNS records and links first. The bucket and its files are not deleted.

In the CDN list, click the delete icon in the Actions column. In the Delete Distribution dialog, type the distribution’s name and click Delete Distribution.

Use the API

Create a distribution for a bucket (origin_id is the bucket name):

curl -X POST "https://api.ibee.ai/v1/cdn/distributions?workspace_id=710995" \
-H "Authorization: Bearer $IBEE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "website-assets",
"origin_type": "bucket",
"origin_id": "website-assets",
"cache_policy": "static-assets"
}'

The answer includes id, status and default_url. Purge two files:

curl -X POST "https://api.ibee.ai/v1/cdn/distributions/DISTRIBUTION-ID/purge?workspace_id=710995" \
-H "Authorization: Bearer $IBEE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode": "url", "paths": ["/images/logo.png", "/css/site.css"]}'

Other operations:

TaskOperation
List, get, change or delete distributionsGET /cdn/distributions, GET, PATCH or DELETE /cdn/distributions/DISTRIBUTION-ID
Turn a distribution off or on, rename it, or change its cache policy (API only)PATCH /cdn/distributions/DISTRIBUTION-ID with enabled, name or cache_policy
Single-page app settingGET, PUT or DELETE /cdn/distributions/DISTRIBUTION-ID/website-config
Custom domainsGET or POST /cdn/distributions/DISTRIBUTION-ID/custom-domains; GET or DELETE .../custom-domains/DOMAIN; POST .../custom-domains/DOMAIN/verify
MetricsGET /cdn/distributions/DISTRIBUTION-ID/metrics?range=24h (or 7d, 30d)

Limits

ItemValue
DistributionsSet by your plan. See Limits and quotas.
Distributions per bucket1
Name1–128 characters
OriginA public Object Storage bucket
Cache times1 hour, 30 days, 1 year, or not cached
Custom domain hostname3–253 characters
Custom domain setupUsually 5–15 minutes, up to 1 hour
Purge entries30 URLs, or 100 hostnames, tags or prefixes per purge
Metrics ranges24 hours, 7 days, 30 days

Troubleshooting

You seeWhat it meansWhat to do
”Bucket is not public. Only public buckets can be used as CDN origins.”The bucket is privateTurn on Public Access for the bucket, then create the distribution again.
Visitors still get an old fileThe CDN copy hasn’t been purged yetPurge CDN with a URL or Prefix purge.
404 from the CDN URLThe path doesn’t match an object key, or the file isn’t in the bucketCheck the key, including upper and lower case. For an SPA, turn on Enable SPA.
Cache hit rate stays lowThe policy is No Cache, or each file is requested only onceUse Static Assets or Media Files for files that don’t change on every request.
Custom domain stays PendingThe CNAME isn’t visible yet, or extra records are missingCheck the record with dig +short CNAME cdn.example.com, add any TXT records the card lists, then click Verify. Allow up to 1 hour.
”DNS records not yet propagated. Try again in a few minutes.” (after Verify)The DNS change hasn’t spread yetWait a few minutes and click Verify again.
Creating a distribution with a custom origin failsCustom origins don’t work at the momentUse an Object Storage bucket.
”You have reached your plan’s limit for this resource.”Your plan’s distribution limit is used upDelete a distribution, or click Request a limit increase.