Skip to main content
The experiments in this repository demonstrate various Cloudflare platform features. Each feature enables developers to build powerful applications that run at the edge, close to users worldwide.

Core Features

Cloudflare Workers

Edge compute platform that runs JavaScript/TypeScript on Cloudflare’s global network.All experiments run on Workers, providing:
  • Global deployment in 300+ cities
  • Sub-millisecond cold starts
  • Zero-config scaling
  • Request/Response manipulation
  • Standard Web APIs (fetch, URL, etc.)
Used in: All experiments

Workers AI

Serverless AI inference at the edge with built-in models.Run language models directly from Workers:
  • Text generation and summarization
  • No GPU infrastructure required
  • Pay-per-inference pricing
  • Multiple model options
Used in:

Browser Rendering

Headless browser automation powered by Puppeteer on the edge.Capture screenshots and interact with web pages:
  • Full Chrome browser in Workers
  • Screenshot capture
  • Page navigation and interaction
  • No browser infrastructure to manage
Used in:

HTMLRewriter

Streaming HTML parser for transforming HTML on the fly.Parse and extract data from HTML without buffering:
  • Streaming HTML transformation
  • CSS selector-based parsing
  • Low memory overhead
  • Regex-based extraction patterns
Used in:

Storage Features

D1 (SQL Database)

SQLite database at the edge with global replication.Serverless SQL for relational data:
  • SQLite syntax and compatibility
  • Automatic backups
  • Read replication
  • Schema migrations
  • Low-latency queries from edge
Used in:

Workers KV

Global key-value store optimized for high-read workloads.Distributed KV storage:
  • Eventually consistent reads
  • Global edge caching
  • TTL support
  • Ideal for read-heavy caching
Used in:

R2 Storage

Object storage compatible with S3 APIs, with zero egress fees.Store files and assets:
  • S3-compatible API
  • No egress charges
  • Public and private buckets
  • Custom metadata support
  • Ideal for images, videos, files
Used in:

Network Features

Edge Networking

Global network with advanced request handling.Access network-level information:
  • Geolocation data (country, city, region)
  • Data center (colo) information
  • Request metadata
  • TLS/SSL information
Used in:

Fetch API

Standards-based HTTP client with edge optimizations.Make HTTP requests from the edge:
  • Standard Web Fetch API
  • Automatic retries and failover
  • Connection pooling
  • Header manipulation
Used in: Most experiments for fetching external content

Feature Comparison

FeatureTypeUse CaseCold StartPricing Model
WorkersComputeEdge functions<1msPer request
Workers AIAI/MLInference~50msPer inference
Browser RenderingComputeScreenshots, scraping~2sPer session
D1StorageRelational data~5msReads + writes
KVStorageCaching<1msReads + writes
R2StorageObject storage~10msStorage + operations

Architecture Patterns

Experiments demonstrate several common patterns:

Fetch + Parse Pattern

Fetch external HTML and parse with regex or HTMLRewriter:
  • Dependency Analyzer
  • Website Metadata Extractor
  • Website DevTools Inspector

AI Integration Pattern

Fetch content, extract text, and summarize with Workers AI:
  • AI Website Summary
  • GitHub Repo Explainer

Storage Pattern

Combine D1 (primary) with KV (cache) for optimal performance:
  • Link Shortener (D1 + KV)

Object Storage Pattern

Public and private R2 buckets with direct URLs:
  • R2 Storage

Learn More

Cloudflare Developer Documentation

Official documentation for all Cloudflare developer products