Relay Proxy
The relay proxy is a lightweight Go binary that caches flag values from the central FeatureSignals API and serves them locally.
Use Cases
- Edge deployment: Run the proxy close to your application for sub-millisecond flag reads
- On-premises: Serve flags within your private network
- High availability: Cached flags survive brief upstream outages
- Reduce API load: Hundreds of SDK instances connect to the proxy instead of the central API
Running the Relay Proxy
bash
docker run -d \
-p 8090:8090 \
-e FS_API_KEY="fs_srv_your_key" \
-e FS_ENV_KEY="production" \
-e FS_UPSTREAM="http://your-server:8080" \
featuresignals-relayConfiguration
| Flag / Env Var | Default | Description |
|---|---|---|
-api-key / FS_API_KEY | (required) | Server API key |
-env-key / FS_ENV_KEY | (required) | Environment key |
-upstream / FS_UPSTREAM | https://api.featuresignals.com | Upstream API URL |
-port / FS_PORT | 8090 | Local listening port |
Connecting SDKs
typescript
const client = new FeatureSignalsClient('fs_srv_...', {
envKey: 'production',
baseURL: 'http://relay-proxy:8090', // ← proxy URL
});