An Elixir feature flag library with multi-level storage, caching, and a web dashboard for runtime toggles.
FunWithFlags is an Elixir library for implementing feature flags (also known as feature toggles) in applications. It provides a runtime mechanism to enable or disable features, control rollouts to specific users or groups, and perform A/B testing without code deployments. The system uses a two-level storage architecture with persistent backends and local ETS caching for high performance.
Elixir developers building web applications or services that require dynamic feature management, gradual rollouts, canary releases, or operational feature control in production environments.
Developers choose FunWithFlags for its Elixir-native design, efficient caching that reduces database load, built-in PubSub for multi-node synchronization, and extensible architecture supporting multiple persistence adapters and a web dashboard for easy management.
Feature Flags/Toggles for Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements a two-level storage with ETS cache for fast local lookups, reducing database load by 10-40 times compared to direct queries, as shown in the README benchmarks.
Supports boolean, actor, group, and percentage gates, enabling fine-grained feature management like gradual rollouts to specific users or A/B testing with deterministic actor scoring.
Uses PubSub notifications via Redis or Phoenix.PubSub to keep ETS caches consistent across multiple nodes in a cluster, ensuring flag changes propagate efficiently.
Allows custom persistence adapters through a defined behaviour, making it possible to integrate with storage systems beyond the built-in Redis and Ecto options.
Requires configuration of persistence adapters (Redis or Ecto with a database) and PubSub, adding infrastructure overhead and potential points of failure, especially in multi-adapter scenarios.
Relies on PubSub for cache busting; if notifications fail, nodes can become inconsistent, necessitating TTL fallbacks or manual intervention, as admitted in the 'So, caching, huh?' section.
Tied to the Elixir/OTP ecosystem, making it unsuitable for projects using other programming languages or requiring cross-platform feature flag management without additional bridging efforts.
fun_with_flags is an open-source alternative to the following products: