Skip to content

Commit

Permalink
chore: mention streaming in client sdk docs (#284)
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
  • Loading branch information
markphelps authored Oct 24, 2024
1 parent 33feddc commit 20c5fe9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cloud/guides/production.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,16 @@ Currently, Flipt Cloud only support client-side SDKs for direct evaluation via t
- `URL`: The URL of the Flipt Cloud API.
- `Authentication`: The API key authentication method configured with the API key you created in the previous step.
- (Optional) `Namespace`: The namespace to use for the SDK. (Default: `default`)
- (Optional) `Fetch Mode`: Set to `streaming` to enable streaming mode. (Default: `polling`)

For example, here's how you can configure the SDK for a Go application:

```go
evaluationClient, _ := flipt.NewClient(
flipt.WithURL("https://<environment>-<organization>.flipt.cloud"),
flipt.WithClientTokenAuthentication(<api-key>),
flipt.WithNamespace(<namespace>)
flipt.WithNamespace(<namespace>),
flipt.WithFetchMode(flipt.FetchModeStreaming),
)
```

Expand Down
2 changes: 2 additions & 0 deletions cloud/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ description: Our Cloud offering is the simplest, scalable solution for getting s

- **GitOps and ClickOps Friendly**: Store your feature flag configurations in your own Git repository, giving you full control over your data while benefiting from familiar Git workflows. Non-technical team members can still easily manage flags through our user-friendly interface.

- **Real-Time Updates**: With Flipt Cloud, you can enable streaming mode, which will make the SDK subscribe to changes on the Flipt server and update the state of the flags accordingly in real-time.

- **Zero Lock-In**: With your feature flag data stored in a standard YAML format, you're never locked into our platform. Easily export or migrate your data at any time, ensuring flexibility as your needs evolve.

- **Scalable and Enterprise-Ready**: Our cloud infrastructure is designed to handle high-volume traffic and complex flag evaluations, making it suitable for organizations of all sizes, from startups to global enterprises.
Expand Down
13 changes: 13 additions & 0 deletions integration/client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,16 @@ Flipt provides a number of client-side SDKs to help you integrate with Flipt in
> Need a client in another language? Let us know!
</Card>
</CardGroup>
## Polling vs Streaming

By default, the SDKs will use a polling mechanism to sync the state of the flags with the Flipt server. You can set the polling interval using the `updateInterval` option in the SDK's configuration.

If you are a [Flipt Cloud](/cloud/overview) user, you can enable `streaming` mode, which will make the SDK subscribe to changes on the Flipt server and update the state of the flags accordingly in real-time.

<Card href="/cloud/overview" title="Flipt Cloud" icon="cloud">
Flipt Cloud is a fully managed feature management platform that enables you to
continue to use Flipt's feature management capabilities with zero maintenance.
</Card>

Streaming is available for all Flipt Cloud plans, even the free tier.
6 changes: 6 additions & 0 deletions integration/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ Client-side evaluation is another way Flipt supports evaluating feature flags. T

Client-side evaluation is much more performant than server-side evaluation, but it comes with some tradeoffs. The main tradeoff is that you need to keep your feature flag rules in sync with Flipt. This means that you will need to periodically fetch the feature flag rules from Flipt and update your local copy. Our client-side SDKs provide a way to do this automatically.

<Tip>
If you are a [Flipt Cloud](/cloud/overview) user, you can enable streaming
mode, which will make the SDK subscribe to changes on the Flipt server and
update the state of the flags accordingly in real-time.
</Tip>

Reasons for using client-side evaluation include:

- You want to reduce the number of requests your application makes to Flipt for feature flag evaluations
Expand Down

0 comments on commit 20c5fe9

Please sign in to comment.