import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Canary Release

**Canary release** is a technique to reduce the risk of introducing a new software version in production by slowly rolling out the change to a small subset of users before rolling it out to the entire infrastructure and making it available to everybody.

This is the easiest rollout strategy available.
You just have to select a percentage of your users in your flag, and the `True` behavior will apply to them.

## Example

<Tabs groupId="code">
  <TabItem value="yaml" label="YAML">

```yaml
canary-flag:
  variations:
    oldBehavior: false
    canary: true
  defaultRule:
  # highlight-start
    percentage:
      oldBehavior: 99
      canary: 1
  # highlight-end
```

  </TabItem>
  <TabItem value="json" label="JSON">

```json
 {
  "canary-flag": {
    "variations": {
      "oldBehavior": false,
      "canary": true
    },
    "defaultRule": {
# highlight-start
      "percentage": {
        "oldBehavior": 99,
        "canary": 1
      }
# highlight-end
    }
  }
}
```

  </TabItem>
  <TabItem value="toml" label="TOML">


```toml
[canary-flag.variations]
oldBehavior = false
canary = true

# highlight-start
[canary-flag.defaultRule.percentage]
oldBehavior = 99
canary = 1
# highlight-end
```

  </TabItem>
</Tabs>
