Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Bronto CDN Demo Site

A minimal static site for validating CDN log pipelines into Bronto across Cloudflare, Fastly, and Akamai simultaneously.

Architecture

k6 (traffic-generator.js)
         ↓
  ┌──────────────────────────────────────────┐
  │  CDN layer                               │
  │  Cloudflare    Fastly       Akamai       │
  │  (Logpush)     (HTTPS logs) (DS2)        │
  └──────────────────────────────────────────┘
         ↓ requests              ↓ log streams
    Origin (Vercel)             Bronto

All three CDNs proxy the same Vercel origin. Each generates its own log stream to Bronto using its native mechanism. k6 sends traffic through all three via separate hostnames.


Step 1 — Deploy the origin to Vercel

npm install -g vercel
vercel deploy

Note the deployment URL, e.g. bronto-cdn-demo.vercel.app. This is your origin.


Step 2 — Configure your DNS

Add three CNAMEs to your domain. Example using demo.bronto.io:

Hostname Points to
cdn-cf.demo.bronto.io Your Cloudflare proxied domain
cdn-fastly.demo.bronto.io Your Fastly service domain
cdn-akamai.demo.bronto.io Your Akamai property hostname

Step 3 — Configure Cloudflare

  1. Add cdn-cf.yourdomain.com as a proxied (orange cloud) DNS record in Cloudflare pointing to bronto-cdn-demo.vercel.app.
  2. Enable Logpush under Analytics & Logs:
    • Destination: HTTP
    • URL: https://ingestion.eu.bronto.io/?header_x-bronto-api-key=<YOUR_KEY>&service_namespace=cdn_demo&service_name=cloudflare
  3. Send the Cloudflare traffic generator request from the Logpush UI to confirm logs arrive in Bronto.

Step 4 — Configure Fastly

  1. Create a new CDN service in Fastly with:
    • Origin: bronto-cdn-demo.vercel.app (port 443, TLS enabled)
    • Domain: cdn-fastly.yourdomain.com
  2. Add an HTTPS logging endpoint:
    • URL: https://ingestion.eu.bronto.io/?service_name=fastly&service_namespace=cdn_demo
    • Custom header name: x-bronto-api-key
    • Custom header value: <YOUR_KEY>
    • Content type: application/json
    • Method: POST
    • JSON format: Newline Delimited
    • Log format: (paste the JSON template from Bronto's Fastly docs)
  3. Activate the service version.

Step 5 — Configure Akamai

  1. Create a property in Akamai Property Manager:
    • Origin: bronto-cdn-demo.vercel.app
    • Hostname: cdn-akamai.yourdomain.com
  2. Add the DataStream behavior to your property.
  3. Create a DataStream 2 stream:
    • Destination: Custom HTTPS
    • URL: https://ingestion.eu.bronto.io/?service_name=akamai&service_namespace=cdn_demo
    • Authentication: None
    • Custom header: x-bronto-api-key: <YOUR_KEY>
    • Enable compression

Step 6 — Generate traffic

Install k6:

brew install k6        # macOS
# or: https://k6.io/docs/get-started/installation/

Run with your hostnames:

k6 run \
  -e CF_HOST=cdn-cf.yourdomain.com \
  -e FASTLY_HOST=cdn-fastly.yourdomain.com \
  -e AKAMAI_HOST=cdn-akamai.yourdomain.com \
  traffic-generator.js

Default run: 6 virtual users for 5 minutes with a traffic burst at the 2-minute mark. Generates ~500–1000 requests split across all three CDNs.


What the traffic generator produces

URL path Cache behaviour Log signal
/ Short TTL (300s) HTML requests, mix of HIT/MISS
/products Short TTL Varied path in logs
/about Short TTL Varied path in logs
/api/status 60s TTL JSON endpoint, frequent HIT
/assets/style.css 24h TTL Strong cache, mostly HIT
/assets/app.js 24h TTL Strong cache, mostly HIT
/assets/hero.jpg 24h TTL Large asset, strong HIT
/assets/hero.jpg?bust= Cache-busted Forced MISS — tests MISS pipeline
/this-does-not-exist N/A 404 — tests error rate monitors
/products/item-999 N/A 404 — second error pattern

Validating in Bronto

Once traffic is flowing, confirm the following in Bronto:

  1. Three services visible under cdn_demo collection: cloudflare, fastly, akamai
  2. Status code distribution: mix of 200s and 404s across all three providers
  3. Cache hit ratio: visible in log fields after ~2 minutes of warmup traffic
  4. Error rate spike: visible when burst scenario fires at the 2-minute mark
  5. Path breakdown: /assets/* requests should dominate by volume; /this-does-not-exist should be consistently 404

Quick validation (no k6 required)

For a fast pipeline check before running k6, use curl:

# Replace with your actual CDN hostname
for i in {1..10}; do
  curl -s -o /dev/null -w "%{http_code} %{time_total}s\n" \
    https://cdn-cf.yourdomain.com/assets/style.css
done

Run the same for your Fastly and Akamai hostnames. Logs should appear in Bronto within 30–60 seconds for Cloudflare and Fastly; up to 2 minutes for Akamai.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages