Story #49 Environment Configuration · Feature Flags · Deployment Consistency

The Feature Flag That Made Identical Requests Return Different Rules

"Same tenant, same request, two different eligibility answers—from the same deployment"

An insurance platform rolled out a new eligibility calculation behind a feature flag. Two application instances received different configuration snapshots because one didn't refresh its flag cache after deployment. Identical requests produced different eligibility results depending on which instance handled them.

What happened

An insurance platform introduced a new eligibility calculation behind a feature flag. The flag was enabled for a pilot group of tenants and disabled for all other customers. During rollout, two application instances received different configuration snapshots because one instance did not refresh its flag cache after deployment.

Identical requests for the same tenant therefore produced different eligibility results depending on which instance handled the request. The load balancer distributed traffic across both instances, making the defect appear intermittent. Staging had only one instance and all test tenants had the flag enabled, so the release validation did not reproduce production behavior.

The organization initially suspected a data race in the calculation engine. Investigation showed that the business logic was deterministic; the effective configuration was not. The deployment process had no check that feature-flag state and configuration versions were consistent across instances.

Root cause

Instances served different effective feature-flag configurations for the same tenant and request. Validation did not include multi-instance production-like rollout states or tenant-specific flag combinations.

The fix

The team added configuration version visibility, refresh guarantees, and rollout checks. Tests now cover enabled, disabled, partial rollout, tenant overrides, and multiple instances receiving the same effective configuration.

Testing gaps and preventive tests

Configuration parity checks, multi-instance consistency tests, flag transition tests, and deployment smoke tests. Feature flags are part of runtime behavior—a correct implementation can still behave incorrectly when configuration is inconsistent.

Business impact

Customers received inconsistent eligibility decisions, requiring review of decisions made during the rollout window.

Lesson learned

Feature flags are part of runtime behavior. A correct implementation can still behave incorrectly when configuration is inconsistent.

The Feature Flag That Made Identical Requests Return Different Rules