Unleash – The Magic of Feature Flags
Imagine testing new features in production, experimenting with different variations, and making informed decisions before committing.
“Welcome to the realm of feature flags.”
What is Unleash Tool?
Unleash is an open-source toggle management solution that provides many ways to create and manage toggles through its UI. It is a feature toggle system that provides an overview of all the features you have on all your applications and services.
Developers can explore platform features safely since it lets them ship code to production in small increments to control new feature rollouts and minimize risk.
It also provides server-side SDKs for key languages (Java, Go, NodeJS, Python, etc.) along with Front end SDKs (Android, IOS, JavaScript, React) that need to interact via Unleash Proxy.
What is Feature Toggle?
Developers use a feature toggle, also known as a feature flag or switch, to enable or disable specific features without modifying any code. This switch can be effortlessly flipped ON or OFF without deploying any code. Feature toggles serve as a basic conditional statement that determines whether a particular feature is visible or accessible to end-users.
How will Toggle be helpful?
As you can imagine, a toggle can be useful for several reasons and in several processes. Here are some common uses of toggles in feature flags:
1. Controlled Rollouts
Feature toggles allow selective enabling or disabling of certain features for specific user groups or environments. This allows better management of new feature rollouts. By gradually introducing updated features to a subset of users and monitoring their impact, problems can be addressed before a full release. Overall, this approach streamlines the process of introducing enhanced features.
2. Canary Releases
Canary is the name used to identify a new feature that is tested with real users in a live environment. Toggling a new feature allows canaries to be released to a small group of users before being rolled out to everyone. As a result, any performance bottlenecks or issues can be detected and addressed early, ensuring a smooth and reliable release.
3. Beta Releases
When using feature toggles, beta testers can select which features to enable in beta releases. This allows teams to gather valuable feedback, identify bugs, and improve the user experience before a full release is released.
Who can use Unleash– Feature Flag Management Tool?
Unleash can be used by various stakeholders involved in the software development process, including:
- Developers: Developers are the primary users of Unleash. They use it to control the visibility and behavior of features, conduct controlled rollouts, and enable/disable features based on specific conditions.
3. DevOps Teams: DevOps teams are responsible for deploying and managing applications in production environments. DevOps teams can utilize Unleash to monitor feature performance and ensure smooth and stable rollouts.
The Strategy of Unleash
A Strategy is a condition that is evaluated to decide if the toggle is switched ON or OFF. To determine the toggle condition, Unleash includes a list of built-in activation strategies which are as follows:
1. Standard
It is a basic strategy which means that it is “active for everyone.” This strategy has the following modeling name: default.
2. UserIDs
It is active for users whose UserId is defined in the UserIds list. This feature may be enabled for a few specified developers or key persons with an assigned ID before being enabled for everyone.
Parameters
UserIds – This refers to a list of user IDs for whom you want the feature toggle to be enabled. This strategy has the modeling name: UserWithId.
3. Gradual Rollout
In this approach, all gradual rollout strategies are combined into one approach. You customize which parameter should be “sticky” and the default value is UserId or SessionId.
Parameters
Stickiness: This process dictates how gradually rolling out a new feature will be consistent. It should be predictable to get the same results when using the same UserId and rollout percentage. The configurations that should be supported are:
- Default – Unleash chooses the first value present in the context in defined order userId, sessionId, random.
- UserId – Guaranteed to be sticky on userId. If userId is not present the behavior would be false.
- SessionId – Guaranteed to be sticky on sessionId. If sessionId is not present the behavior would be false.
- Random – No stickiness is guaranteed. For every enabled call, it will yield a random true/false based on the selected rollout percentage.
4. IPs
The Remote Address strategy activates a feature toggle for remote addresses defined in the IP list. We occasionally use this strategy to enable a feature only for IPs in our office network.
Parameters
IPs – List of IPs for which a feature is enabled. This strategy’s modeling name in the code is RemoteAddress.
5. Hostnames
The hostname strategy activates a feature toggle for client instances whose HostName is in the HostNames list.
Parameters
HostNames – A list of hostnames for whom the feature is enabled. This strategy’s modeling name in the code is ApplicationHostName.
Getting Started With Unleash
To start using Unleash, an Unleash Instance (where you create and maintain toggle-related information) is needed, and an SDK is used to connect users to the instance.
Three things are needed to set up Unleash.
1. Postgres: Where Unleash saves the feature flag status.
2. Unleash-server: That provides a UI and endpoint to query for the status of the flags.
3. Unleash-client-node: A library of resources used to connect to the Unleash server and identify the status of the flag.
Steps For Setting Up Unleash
1. Create a Docker Network that is used by Unleash Instance
docker network create unleash.
2. Create a Postgres Instance.
docker run -e POSTGRES_PASSWORD=some_password \-e POSTGRESS_USER=unleash_user -e POSTGRESS_DB= unleash \ --network
unleash –name postgres
3. Start Unleash Instance from a Docker Image
docker run -p 4242:4242 \ -e DATABSE_HOST=postgres -e DATABASE_NAME=unleash\-e POSTGRESS_USERNAME=unleash_user -e
DATABASE_PASSWORD= some_password \-e DATABASE_SSL=false\--network
unleash unleashorg/unleash-server
How can we help you?
We have hundreds of highly-qualified, experienced experts working in 70+ technologies.