Rejected: SQL-Based Feature Flagging for Application Configuration

The Context

During development of the V-Sekai application architecture, a proposal was made to implement SQL-based feature flagging to enable runtime configuration changes without application restarts. This would allow toggling between different implementations (such as Next.js vs LiveView frontends) and enabling/disabling features dynamically.

The Problem Statement

The development team needed a mechanism to manage feature toggles and configuration changes that would support: - Gradual rollout of new features - A/B testing of different implementations - Runtime configuration changes without service downtime - Managing separate docker container deployments

Design

The proposed SQL-based feature flagging system would: - Store feature flags and configuration values in database tables - Provide runtime querying of flag states - Allow dynamic enabling/disabling of features without code changes - Support per-user or per-environment flag overrides

However, this approach was rejected in favor of simpler alternatives.

The Benefits

The rejected proposal would have provided: dynamic runtime configuration without restarts, database-backed configuration management, granular control over feature availability, and the potential for user-specific feature toggles. None of these were implemented.

The Downsides

SQL-based feature flagging issues: - Complex database schema and query logic for simple configuration needs - Configuration stored in database tables is harder to version control and audit - Cannot control separate container execution (either run Next.js container or don’t) - Runtime flag changes don’t affect code paths that branch during application startup - Additional complexity for operations and debugging

Runtime configuration problems: - Some application behavior is determined at startup and cannot be changed dynamically - Feature flags don’t solve the underlying problem of maintaining parallel implementations - Introduces potential for inconsistent application state during flag transitions

The Road Not Taken

SQL-based feature flagging: database tables for configuration management, a runtime flag evaluation system, administrative interfaces for flag management, and flag state synchronization across distributed systems.

Dynamic runtime configuration: systems that allow all configuration to change without restart, complex caching invalidation, and sophisticated state management for configuration changes.

The Infrequent Use Case

SQL feature flagging may be appropriate for: large enterprise applications with hundreds of features requiring granular control; systems where configuration changes must take effect immediately without any downtime; applications with user-specific feature customization requirements; or complex A/B testing scenarios requiring database-backed analytics.

In Core and Done by Us

Configuration management is core to application deployment and operations. The development team handles configuration through environment variables, YAML files, and Elixir configuration files (config.exs) rather than implementing complex database-backed systems.

Status

Status: Rejected

Decision Makers

  • iFire
  • Lyuma

Tags

  • Configuration, Feature-Flags, Architecture, Elixir, Database, Operations, 20260128-reject-sql-based-feature-flagging

Further Reading

(Managing Feature Toggles in Teams 2026): “Managing feature toggles in teams: The limits of feature toggles.” https://thoughtworks.com/en-us/insights/blog/continuous-delivery/limits-of-feature-toggles (Feature Toggles (Aka Feature Flags) 2026): “Feature Toggles (aka Feature Flags).” https://martinfowler.com/articles/feature-toggles.html (Configuration as Code Best Practices 2026): “Configuration as Code Best Practices.” https://12factor.net/config


Configuration Terminology

  1. Feature Flag: A mechanism to enable or disable functionality without code changes
  2. Configuration Drift: When runtime configuration differs from deployed code expectations
  3. Twelve-Factor App: Application development methodology emphasizing configuration through environment variables
  4. Hot Reload: Changing application behavior without restarting the process

References

Configuration as Code Best Practices. 2026. https://12factor.net/config.
Feature Toggles (Aka Feature Flags). 2026. https://martinfowler.com/articles/feature-toggles.html.
Managing Feature Toggles in Teams: The Limits of Feature Toggles. 2026. https://thoughtworks.com/en-us/insights/blog/continuous-delivery/limits-of-feature-toggles.