Relay proxy
Serve Launch rulesets through a relay with disk snapshots, client key evaluation, change events and exposure forwarding.
How it works
- EVOLVE_RELAY_KEYS names each environment and its server key, as production=evk_... and comma separated. EVOLVE_RELAY_CLIENT_KEYS lists the client keys the relay accepts for each environment, as production=evk_pub_a|evk_pub_b. A key that is not listed exactly is refused with 401.
- Point an SDK at the relay URL in place of the flags URL. The relay serves /bootstrap, /stream, /exposures and /health with the request and response shapes of /api/public/v1/flags.
- A server key receives the full ruleset with an ETag and answers 304 to If-None-Match. The relay serves ruleset version 2, so an SDK that predates ruleset versioning should connect to e-volv directly.
- A client key receives evaluated values only, for flags marked client side available, or mobile available when the request carries x-evolve-app-id. Big and synced segments need e-volv to look up membership, so the relay treats their contexts as non-members.
- The relay polls e-volv every 30 seconds. When the ruleset ETag changes, every open /stream gets a ruleset event, so SDKs refetch within about 30 seconds of a change. Client keys cannot open /stream.
- When upstream is lost, the last disk snapshot keeps serving and /health reports stale with its age. With no snapshot and no upstream, /bootstrap answers 503. Recovery needs no restart.
- Exposures are buffered per environment, up to 10,000 rows each with the oldest dropped first, and forwarded with that environment's server key in batches of 1,000.
docker run -p 8080:8080 \ -e EVOLVE_RELAY_KEYS=production=evk_... \ -e EVOLVE_RELAY_CLIENT_KEYS=production=evk_pub_... \ -e EVOLVE_RELAY_DATA_DIR=/var/lib/evolve-relay \ -e EVOLVE_RELAY_UPSTREAM=https://api.e-volv.io \ -v evolve-relay:/var/lib/evolve-relay \ REGION-docker.pkg.dev/PROJECT/evolve/launch-relay:latest
Read the Launch overview or the SDK guides.