This document helps you get started with Unleash Edge locally.
Unleash Edge is a lightweight layer between your SDKs and your Unleash instance. It exposes the same HTTP interface as the main Unleash API but is built for higher throughput and lower latency.
Unleash Edge helps you reduce latency for flag resolution by running closer to your users. For example, Unleash Edge could run on a global content-delivery network (CDN) or as part of your cloud or on-premises infrastructure.
Setting up one or more Edge nodes helps you distribute traffic and reduce the load on your Unleash instance. By default, Unleash Edge relies on in-memory caching, but you can configure it to use Redis or the local filesystem.
Here’s what you need before getting started:
4.15 or later)First, make sure your Unleash instance is running (locally or remotely) and generate a new backend API token.
You can install prebuilt binaries for your OS directly from GitHub Releases:
Make sure to replace <version> with a valid GitHub Release tag such as v20.1.0.
You can pick a valid version from the list of releases on GitHub.
Then launch it:
Let’s break down the parameters you need to replace in the launch command.
<your_unleash_instance>This is the URL of your Unleash instance.
Use the base URL, e.g. https://app.unleash-hosted.com/testclient or http://localhost:4242.
<your_backend_token>This API token is required in strict mode, which is recommended since v19.2.
You can generate a new API token by visiting your Unleash instance, under Admin settings > Access control > API access. Click New API token, give it a name, and confirm the default values.
Note: make sure you keep the single quotes in --tokens '...' so the * isn’t expanded by your shell.
Before you continue, make sure Unleash Edge is running on port 3063.
You can verify this by fetching http://localhost:3063/internal-backstage/health. This endpoint should respond with {"status":"OK"}.
Then you can start updating your application:
http://localhost:3063.For example, if you’re using the .NET example, update the API URL and token in your .env file:
If you run into issues while connecting your SDK to Unleash Edge, the following commands can help you identify the problem.
You might encounter some of these common issues:
127.0.0.1:4242 within Docker, you’re pointing at localhost inside the container. Use host.docker.internal or a shared Docker network instead.Congratulations, you’ve successfully set up Unleash Edge locally!
Unleash Edge offers a lot of flexibility and advanced configuration options worth exploring:
--backup-folder and --redis-url.--base-path, --workers, --allow-list, --edge-request-timeout, and --edge-auth-header.