Skip to content

Commit

Permalink
FFM-8890 Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
erdirowlands committed Aug 21, 2023
1 parent 817ad95 commit 4d23b8a
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,25 @@ config :cfclient,
]}]
```

## Experimental: Use Flag Identifier with Percentage Rollout Hash
## Percentage Rollout Experimental Features

### Elixir
### Hash Flag Identifier

This option uses murmur3 hash on the flag identifier, and then appends the hash onto the flag identifier. The full
bitstring then runs through murmur3 hash again.

#### Elixir

To enable this, set `hash_flag_and_target_ids` to true.
Activation: To activate this feature, set `hash_flag_and_target_ids` to true.

If `hash_flag_and_target_ids` is not explicitly set, or set to false, the SDK will use the original hashing method.
Default Behavior: If `hash_flag_and_target_ids` is not explicitly set, or set to false, the SDK will only hash the target identifier.

```elixir
config :cfclient,
log_level: :debug,
[api_key: System.get_env("FF_API_KEY_0"),
[
api_key: System.get_env("FF_API_KEY_0"),
log_level: :debug,

# For additional config you can pass in, see Erlang SDK docs: https://github.com/harness/ff-erlang-server-sdk/blob/main/docs/further_reading.md#further-reading
# we are just using the main config url here as an example.
config: [
Expand All @@ -230,6 +237,34 @@ config :cfclient,
]]
```

### Multiply hash by a prime number

This option will multiply the hash by the number you provide. We recommend a prime number, like 17.

### Elixir

Activation: To activate this feature, set the value of `prime_multiplication_for_rollout` to your required number

Combination: This feature can be used alongside `hash_flag_and_target_ids`

Default Behavior: If `prime_multiplication_for_rollout` is not explicitly set, or set to false, the SDK will proceed without multiplying the hash.

```elixir
config :cfclient,
[
api_key: System.get_env("FF_API_KEY_0"),
log_level: :debug,

# For additional config you can pass in, see Erlang SDK docs: https://github.com/harness/ff-erlang-server-sdk/blob/main/docs/further_reading.md#further-reading
# we are just using the main config url here as an example.
config: [
config_url: "https://config.ff.harness.io/api/1.0",
events_url: "https://events.ff.harness.io/api/1.0",
poll_interval: 60000,
prime_multiplication_for_rollout: 17
]]
```

## Run multiple instances of the SDK

The SDK by default starts up a single instance called `default` which is configured with your project API key.
Expand Down Expand Up @@ -572,4 +607,4 @@ In order to run the tests, pull the submodules:
```command
git submodule update --init
```
```

0 comments on commit 4d23b8a

Please sign in to comment.