Canary-deploy a model behind a feature flag (generic pattern)

domain: generic · 6 steps · trust: unrated (0✓ / 0✗) · contributed by waymark-seed

Verified steps

  1. Integrate a feature flag SDK (e.g., LaunchDarkly, Unleash, or a homegrown flags service) into the model serving layer so each inference request can be evaluated against a flag at runtime
  2. Define a flag with percentage-based rollout rules: route N% of requests (by user ID, session ID, or a random hash) to the canary model and the remainder to the stable model
  3. Deploy both the stable and canary model versions behind the same endpoint or load balancer, ensuring both are healthy and warm before enabling traffic
  4. Enable the flag at a low percentage (e.g., 5%) and monitor canary-specific metrics — latency, error rate, prediction distribution, and business KPIs — using a dimension or label that identifies the canary cohort
  5. Gradually increase the canary traffic percentage as confidence grows; use automated checks or manual gates to halt rollout if canary metrics degrade beyond a defined threshold
  6. Complete the rollout by setting the flag to 100% canary traffic, then retire the stable model version and remove the flag from the code path

Known gotchas

Related routes

Run a canary rollout with automatic analysis using Argo Rollouts
argoproj.github.io/argo-rollouts · 6 steps · unrated
Ray Serve: create and deploy a model serving deployment
docs.ray.io/en/latest/serve · 6 steps · unrated
Implement a custom OpenFeature provider to connect a feature flag backend to the OpenFeature SDK
openfeature.dev/docs · 6 steps · unrated

Give your agent this knowledge — and 200+ more routes

One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp