{"id":18677237,"url":"https://github.com/elixir-toniq/rollout","last_synced_at":"2025-12-11T23:38:27.672Z","repository":{"id":41815599,"uuid":"203660835","full_name":"elixir-toniq/rollout","owner":"elixir-toniq","description":"Feature Flags based on LWW registers and HLCs","archived":false,"fork":false,"pushed_at":"2023-04-10T11:01:48.000Z","size":69,"stargazers_count":46,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-25T13:32:44.725Z","etag":null,"topics":["elixir","feature-flags"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-toniq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-08-21T20:38:34.000Z","updated_at":"2024-04-07T10:46:30.000Z","dependencies_parsed_at":"2023-07-12T16:31:14.349Z","dependency_job_id":null,"html_url":"https://github.com/elixir-toniq/rollout","commit_stats":null,"previous_names":["keathley/rollout"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/elixir-toniq/rollout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Frollout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Frollout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Frollout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Frollout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-toniq","download_url":"https://codeload.github.com/elixir-toniq/rollout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Frollout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278909713,"owners_count":26066887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","feature-flags"],"created_at":"2024-11-07T09:33:01.247Z","updated_at":"2025-10-08T07:43:51.932Z","avatar_url":"https://github.com/elixir-toniq.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rollout\n\nRollout allows you to flip features quickly and easily. It relies on\ndistributed erlang and uses LWW-Register and Hybrid-logical clocks\nto provide maximum availability. Rollout has no dependency on an external\nservice such as redis which means rollout feature flags can be used in the\ncritical path of a request with minimal latency increase.\n\n* [Docs](https://hexdocs.pm/rollout).\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:rollout, \"~\u003e 0.2\"}\n  ]\nend\n```\n\n## Usage\n\nRollout provides a simple api for enabling and disabling feature flags across\nyour cluster. A feature flag can be any term.\n\n```elixir\n# Check if a feature is active\nRollout.active?(:blog_post_comments)\n# =\u003e false\n\n# Activate the feature\nRollout.activate(:blog_post_comments)\n\n# De-activate the feature\nRollout.deactivate(:blog_post_comments)\n```\n\nYou can also activate a feature a certain percentage of the time.\n\n```elixir\nRollout.activate_percentage(:blog_post_comments, 20)\n```\n\nYou can run this function on one node in your cluster and the updates will\nbe propogated across the system. This means that updates to feature flags may\nnot be instantaneous across the cluster but under normal conditions should propogate\nquickly. This is a tradeoff I've made in order to maintain the low latency when\nchecking if a flag is enabled.\n\n## How does Rollout work?\n\nRollout utilizes [Groot](https://github.com/keathley/groot) for replicating flags\nacross your cluster. Please look at the groot docs for implementation details.\n\n## Caveats\n\nRollout relies on your nodes being connected through distributed erlang. If you\nare running your application on more than one node and you are not clustering than\nyour changes won't propogate. You will need to run the command on all nodes but\nin practice you'll probably just want to look for an alternative solution.\n\nFlags are *not* maintained in between node restarts. New nodes added to your cluster\nwill be caught up on the current state. But if you bring up an entirely new cluster\nyour flags will revert to their default states. You can mitigate this problem\nby setting defaults for each flag in your `Application.start/2` callback.\n\nChanges made on one node will take time to replicate to other nodes in the cluster.\nBut, its a safe operation to run the same command on multiple nodes. Feature flags\nwill merge cleanly and always default to the latest change seen.\n\n## Should I use this?\n\nIf you're already running a clustered application then this should be a reasonable\nsolution if you need feature flags.\n\n## Future work\n\nI'd like to implement an alternative storage engine for use in non-clustered\nenvironments, preferably using a fast storage engine such as redis. If anyone\nwants to submit that PR I'd love to take a look at it.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-toniq%2Frollout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-toniq%2Frollout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-toniq%2Frollout/lists"}