Skip to main content

Akamai Edge KV

Overview

Statsig’s Akamai Edge KV integration pushes Statsig Configs to Edge KV, providing low latency for gate and experiment evaluations directly in Akamai Edge KV. If you have the correct prerequisites - this should take ~60 minutes to get to the point where you are able to check experiments or gates on Akamai.

Prerequisites

You must have these prerequisites:

  1. An Akamai account with EdgeWorkers added to your contract and a Statsig account
  2. The Akamai CLI

Setup Akamai EdgeWorker

  1. Create an EdgeWorker ID
  2. Add the EdgeWorker Behavior
  3. Install the Akamai CLI
  4. Install the Edgeworkers CLI
  5. Generate EdgeGrid credentials

Configure Integration

First, enable the Akamai integration in the Statsig Console.

Navigate to Project Settings -> Integrations, and then select Akamai

Authentication

You will need to input the following EdgeGrid credentials from the previous section:

Authentication

Configuration

Finalize the configuration by selecting a namespace and environment.

There is also an option to filter the configs that are synced into your KV namespace by a [/sdk-keys/target-apps](Target App). You may wish to enable this in the future as the size of your config payload grows. For now, you can leave this unchecked.

Configuration

After filling this out, click Enable.

Within a minute, the Statsig backend should generate a config payload from your statsig project and push it into your KV namespace. Under your KV namespace, navigate to KV Pairs - you should see an entry starting with the prefix statsig-. The next part of that is your project ID. Copy that to the clipboard - you'll need it later.

Add Statsig SDK to Worker

  1. Create a Statsig server secret key and configure it on Akamai
  2. Clone the Statsig Akamai Edge KV repo (or if you already have an Edge KV package, apply these changes to it)
  3. Follow instructions in the repo

Akamai EdgeWorkers Statsig Akamai Edge KV Repo