Skip to main content

Documentation Index

Fetch the complete documentation index at: https://growthbook-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Edge SDKs run on CDN edge platforms, allowing you to evaluate feature flags and run experiments before your application server handles the request.

Why Edge?

  • Eliminate flicker — Make decisions before the page renders, so users never see content shift
  • Lower latency — Edge nodes are geographically distributed, reducing round-trip time
  • URL redirects — Route users to different URLs based on experiment variations
  • Inject data — Add feature flag data directly into the HTML response

Available Edge SDKs

Cloudflare Workers

Low-latency edge computing on Cloudflare’s global network

Fastly Compute

WebAssembly-powered edge computing with Fastly

Lambda@Edge

AWS Lambda at CloudFront edge locations

How It Works

Edge SDKs intercept requests at the CDN level and can:
  1. Evaluate feature flags using user attributes from cookies, headers, or geolocation
  2. Run A/B tests by assigning users to variations before the origin responds
  3. Perform URL redirects to route users to different pages based on experiment assignments
  4. Modify HTML to inject feature data or experiment variations directly into the response

Common Use Cases

  • Landing page experiments — Test different page layouts without any flicker
  • Geo-based targeting — Show different content based on user location
  • Paywall experiments — Test pricing pages before users see the original
  • Feature rollouts — Gradually roll out features at the edge
  • Personalization — Customize content based on cookies or headers

Architecture

User Request

Edge Worker (GrowthBook SDK)
  - Evaluate feature flags
  - Assign experiment variations
  - Optionally redirect or modify HTML

Origin Server (optional)

Response with experiments applied

Getting Started

Choose your edge platform to see installation and setup instructions:
Edge SDKs have some resource constraints (CPU/memory limits) compared to server SDKs. See each platform’s documentation for specific limitations.