Roll it out, roll it back, never redeploy
Railway now offers feature flags across its dashboard, CLI, TypeScript SDK and MCP server, so code can ship dark behind a default-off flag and be rolled out to a team, a percentage of users, or targeted segments without redeploying. Percentage rollouts use a stable bucket(key) hash, so raising a threshold never flips users back. Reads evaluate in memory against rulesets fetched at init and refreshed in the background, which makes them cheap enough for hot paths. Instead of rule priorities, conflicting or unmatched rules resolve to the flag's default, and an evaluate API returns a reason and per-rule trace for debugging.
Related posts
- Implementing Feature Flags from Scratch
Railway mediumAdeptFeature flags can be built in-house on a Next.js Twitter clone, using Postgres for app data and Redis for flag state, then deployed to Railway. Three flag types are covered: a random 30% user sample for gradual rollout, stored as a Redis Set and checked with SISMEMBER; manual on/off toggles for things like limited-time drops; and targeting based on user metadata such as IP-derived country. The case for building rather than buying is control, lower latency from keeping the flag store on the same network as the app, and a better grasp of the mechanics before choosing a vendor like LaunchDarkly.
- Now you see me, now you don't: feature-flagging with LaunchDarkly at incident.io
incident.io mediumAdeptincident.io ships to production many times a day and uses feature flags to merge large features like Announcement Rules incrementally while hiding them from customers until launch. The team chose LaunchDarkly over building its own system because feature flagging isn't a differentiator, and integrated it across backend and frontend in a day. On the backend, the Go SDK is wrapped in a featureflags package that centralizes flag names as constants, initializes a singleton client, returns clients scoped to user and organization IDs, and supports injecting mocks so tests cover both flag states. On the frontend, the React SDK hook gates UI, and flags are mostly targeted per organization to run beta tests.
- How we ship code faster and safer with feature flags
GitHub Engineering mediumAdeptGitHub puts risky changes and in-progress features behind feature flags so it can deploy continuously and disable problems in seconds instead of rolling back a deployment over several minutes. Flags can target individual actors (users, orgs, repos, GitHub Apps or custom actor types), all staff, beta groups, a sticky percentage of actors, or a per-request percentage ("dark shipping") for invisible changes such as query optimizations. CI runs two builds, one with all flags on and one with all flags off, to cover both code paths. The costs are runtime lookups (metadata in MySQL cached in memcached, with per-actor MySQL queries for large flags) and dead-code debt, which GitHub is automating away with a git grep and rubocop-ast script that rewrites conditionals and tests and opens a pull request routed to CODEOWNERS.
- Canary rollouts: upgrade models in production without downtime
Together AI mediumAdeptTogether AI's rollouts shift live inference traffic from one model deployment to another using canary, blue-green or rolling strategies. Each step scales up the target, runs health gates before shifting traffic, waits for routing caches to propagate, drains the source, and on canaries evaluates metric gates (p95 router latency, error rate, inflight requests) as relative regression or absolute threshold checks. A failed gate system-pauses the rollout; operators cancel to freeze the split and run a reverse rollout instead of using a rollback verb. In a real Qwen2.5-7B → Qwen3.5-9B canary, the gate caught a 137% p95 latency regression at 10% traffic and the reversal completed with no failed requests. Timing guidance covers metric windows, step intervals and ~90s ingestion lag.
- Agentic Coding on Railway: A Practical Guide for 2026
Railway mediumAdeptRailway's official MCP server, per-PR preview environments with isolated databases, one-call rollback, environment promotion and per-environment secrets let agents like Claude Code, Cursor and Codex deploy, debug and validate their own PRs without leaving the loop. Five workflows are walked through: scaffolding and deploying a service, adding Postgres with migrations, creating preview environments, debugging failed deploys from structured logs, and agents testing their own PRs against preview URLs. Long-running migrations, multi-service ordering and cost reasoning still stall. The advice is to scope agent tokens to non-production environments, require human approval for production promotions, set spend alerts, watch for revert loops, add observability via MCP, and write business constraints where the agent can read them.