Fastly Compute@Edge integration - Developer documentation | Documentation

Fastly Compute@Edge integration

All Fastly customers can benefit of redirection.io by using Compute@Edge, the serverless edge computing solution provided by Fastly.

Using redirection.io with Fastly is pretty straightforward:

  1. create a redirection.io account;
  2. create a redirection.io organization and a project. At this step, you may want to invite your co-workers ;
  3. head to the "instances" screen of your project, and hit the "Setup on your infrastructure" button
  4. This opens a lateral panel containing your "project key". Copy this key and install the redirection.io Fastly worker ( see below)
  5. You're all set :-)

Manually deploying the Fastly Compute@edge worker [Permalink to this section](/content/documentation/developer-documentation/fastly-compute-edge-integration#manually-deploying-the-fastly-compute-edge-worker "Permalink to this section"/index.html)

Our Fastly Compute@edge worker code and tooling is open source and available on redirection.io's Github account.

Here are the required steps to deploy the redirection.io worker to your Fastly account:

  1. install the Rust toolchain in your development environment, eg.:
   apt install autoconf build-essential curl wget unzip
   curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
  1. install fastly, the official CLI for interacting with the Fastly platform, and configure the Fastly cli:
   fastly configure
  1. clone the code of the library (you may fork it to your own account, if you need to do some changes to the worker code):
   git clone https://github.com/redirectionio/fastly-worker
   cd fastly-worker
  1. copy the file fastly.dist.toml to fastly.toml. If you wish to use the Fastly local server, edit the values:
  1. in your Fastly dashboard, create a dictionary named redirectionio, and configure the following keys:
  1. in your Fastly dashboard, add a new "Origin Host" to your service. This host must be named redirectionio and have the address "agent.redirection.io".
  2. publish the worker to your Fastly service project:
   fastly compute publish --service-id=XXXXXXXX

Your newly created worker should work after a couple of seconds!

Debugging locally using the local Fastly server [Permalink to this section](/content/documentation/developer-documentation/fastly-compute-edge-integration#debugging-locally-using-the-local-fastly-server "Permalink to this section"/index.html)

The Fastly cli proposes a local server, which is useful to run a worker locally before pushing it online.

To use this local server, copy the file redirectionio.dist.json to redirectionio.json, and edit the values:

Then, launch the local web server:

fastly compute serve

This page has been updated on Apr 16, 2026.