mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
Merge pull request #1122 from Unleash/docs/more-feature-toggle-type-info
docs: Expand feature toggle type documentation, link from important concepts.
This commit is contained in:
commit
3a785bdb0f
@ -5,24 +5,38 @@ title: Feature Toggle Types
|
|||||||
|
|
||||||
> This feature was introduced in _Unleash v3.5.0_.
|
> This feature was introduced in _Unleash v3.5.0_.
|
||||||
|
|
||||||
Starting with version `3.5.0` Unleash introduces the concept of feature toggle types. The toggle types are heavily inspired by [Pete Hodgson's article on feature toggles](https://martinfowler.com/articles/feature-toggles.html).
|
You can use feature toggles to support different use cases, each with their own specific needs. Heavily inspired by [Pete Hodgson's article on feature toggles](https://martinfowler.com/articles/feature-toggles.html), Unleash introduced the concept of feature toggle types in version `3.5.0`.
|
||||||
|
|
||||||
The idea is to make it easier for teams to manage their feature toggles, if they can more clearly classify them. The classification will also help us understand the [expected feature toggle lifetime](https://www.getunleash.io/blog/feature-toggle-life-time-best-practices). Some feature toggles are meant to live for a few weeks, while we work on the new functionality, while others are of a more permanent nature.
|
A feature toggle's type affects only two things:
|
||||||
|
1. It gives the toggle an appropriate icon
|
||||||
|
2. The toggle's expected lifetime changes
|
||||||
|
|
||||||
Feature toggle types currently supported by Unleash:
|
Aside from this, there are no differences between the toggle types and you can always change the type of a toggle after you have created it.
|
||||||
|
|
||||||
- **Release** - Used to enable trunk-based development for teams practicing Continuous Delivery. _Expected lifetime 40 days_
|
Classifying feature toggles by their type makes it easier for you manage them: the toggles get different icons in the toggle list and you can sort the toggles by their types.
|
||||||
- **Experiment** - Used to perform multivariate or A/B testing. _Expected lifetime 40 days_
|
|
||||||
- **Operational** - Used to control operational aspects of the system's behavior. _Expected lifetime 7 days_
|
|
||||||
- **Kill switch** - Used to gracefully degrade system functionality. _(permanent)_
|
|
||||||
- **Permission** - Used to change the features or product experience that certain users receive. _(permanent)_
|
|
||||||
|
|
||||||
### Deprecate a feature toggle {#deprecate-a-feature-toggle}
|
![Five feature toggles, each of a different type, showing the different icons that Unleash uses for each toggle type.](/img/toggle_type_icons.png "Feature toggle type icons")
|
||||||
|
|
||||||
Feature toggles can now also be marked as `stale`. You can think of this as a way to deprecate a feature toggle, without removing the active configuration for connected applications. This allows us to clearly signal that we should stop using the feature toggle in our applications.
|
A toggle's type also helps Unleash understand the [toggle's expected lifetime](https://www.getunleash.io/blog/feature-toggle-life-time-best-practices): some feature toggles are meant to live for a few weeks as you work on new functionality, while others stay in for much longer. When a feature toggle lives past its expected lifetime, Unleash will mark it as _potentially stale_. See the [technical debt section](../user_guide/technical_debt) for more information on what this means and how to handle it.
|
||||||
|
|
||||||
The `stale` property can utilized to help us manage "feature toggle debt" in various ways:
|
## Feature toggle types
|
||||||
|
|
||||||
- Inform the developer working locally when we detect usage of a stale feature toggle.
|
Here's the list of the feature toggle types that Unleash supports together with their intended use case and expected lifetime:
|
||||||
- Use it to break the build if the code contains stale feature toggles.
|
|
||||||
- Send automatic PR to remove usage of completed toggles.
|
- **Release** - Enable trunk-based development for teams practicing Continuous Delivery. _Expected lifetime 40 days_
|
||||||
|
- **Experiment** - Perform multivariate or A/B testing. _Expected lifetime 40 days_
|
||||||
|
- **Operational** - Control operational aspects of the system's behavior. _Expected lifetime 7 days_
|
||||||
|
- **Kill switch** - Gracefully degrade system functionality. _(permanent)_
|
||||||
|
- **Permission** - Change the features or product experience that certain users receive. _(permanent)_
|
||||||
|
|
||||||
|
## Deprecating feature toggles {#deprecate-a-feature-toggle}
|
||||||
|
|
||||||
|
You can mark feature toggles as `stale`. This is a way to deprecate a feature toggle without removing the active configuration for connected applications. Use this to signal that you should stop using the feature in your applications. Stale toggles will show as stale in the ["technical debt dashboard"](../user_guide/technical_debt).
|
||||||
|
|
||||||
|
When you mark a toggle as stale, Unleash will emit an event. You can use [an addon](https://docs.getunleash.io/addons/index) to integrate this with your systems, for instance to post a message in a Slack channel.
|
||||||
|
|
||||||
|
Additionally, with some extra work, you can also use the `stale` property to:
|
||||||
|
|
||||||
|
- Inform developers that a toggle is stale _while_ they're developing.
|
||||||
|
- Break a project build if the code contains stale feature toggles.
|
||||||
|
- Send automatic PRs to remove usage of toggles that have served their purpose.
|
||||||
|
@ -21,7 +21,7 @@ Unleash comes with a set of built in strategies. [But you can also build your ow
|
|||||||
|
|
||||||
All our SDKs perform local evaluation of feature toggles, which means that they download the configuration from unleash and cache the configuration in memory in your application. This is done in order to avoid adding network latency to user interactions, making it unnoticable for users that you are using feature flagging, in addition to the added benefit that none of your data leaves your application - enforcing privacy by design.
|
All our SDKs perform local evaluation of feature toggles, which means that they download the configuration from unleash and cache the configuration in memory in your application. This is done in order to avoid adding network latency to user interactions, making it unnoticable for users that you are using feature flagging, in addition to the added benefit that none of your data leaves your application - enforcing privacy by design.
|
||||||
|
|
||||||
[Read more about our unique architecture here](https://www.getunleash.io/blog/our-unique-architecture)
|
[Read more about our unique architecture here.](https://www.getunleash.io/blog/our-unique-architecture)
|
||||||
|
|
||||||
## Unleash Context
|
## Unleash Context
|
||||||
|
|
||||||
@ -31,10 +31,16 @@ Since the SDKs perform local evaluation, some of the parameters needed for evalu
|
|||||||
|
|
||||||
## API architecture
|
## API architecture
|
||||||
|
|
||||||
The Unleash API is split into two. One API is for the clients connecting unleash and is located under the path /api/client, and provides access to retrieving saved feature toggle configurations, metrics and registering the application.
|
The Unleash API is split into two. One API is for the clients connecting to unleash. It is located under the path /api/client. This provides access to retrieving saved feature toggle configurations, metrics and registering the application.
|
||||||
|
|
||||||
The second API is the admin API, which is utilised in order to control any CRUD aspect of unleash resources. The split ensures a second layer of security that ensures that in the case you should loose your client api key, attackers will only have read-only access to your feature toggle configurations.
|
The second API is the admin API, which is utilised in order to control any CRUD aspect of unleash resources. The split ensures a second layer of security that ensures that in the case you should loose your client api key, attackers will only have read-only access to your feature toggle configurations.
|
||||||
|
|
||||||
This ensures that we can have different data responses for the client API endpoints which will include less metadata, and be cached more heavily - optimising the SDK endpoints for best performance.
|
This ensures that we can have different data responses for the client API endpoints which will include less metadata, and be cached more heavily - optimising the SDK endpoints for best performance.
|
||||||
|
|
||||||
[Read more about unleash API here](../api)
|
[Read more about unleash API here.](../api)
|
||||||
|
|
||||||
|
## Feature toggle types
|
||||||
|
|
||||||
|
Unleash categorizes feature toggles into five distinct types. This categorization makes it easier for you to see what the purpose of a toggle is and helps Unleash with [managing technical debt](/user_guide/technical_debt). A feature toggle's type has no effect on how the toggle behaves or how you can configure it.
|
||||||
|
|
||||||
|
[Read more about feature toggle types here.](../advanced/feature-toggle-types.md)
|
||||||
|
BIN
website/static/img/toggle_type_icons.png
Normal file
BIN
website/static/img/toggle_type_icons.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 209 KiB |
Loading…
Reference in New Issue
Block a user