From eb8a84581b188a2551802bb4b4d2829b230009e0 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:59:31 -0400 Subject: [PATCH] chore: mention streaming in client sdk docs Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com> --- cloud/guides/production.mdx | 4 +++- cloud/overview.mdx | 2 ++ integration/client.mdx | 13 +++++++++++++ integration/overview.mdx | 6 ++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/cloud/guides/production.mdx b/cloud/guides/production.mdx index f02dc2c..c6c56b9 100644 --- a/cloud/guides/production.mdx +++ b/cloud/guides/production.mdx @@ -79,6 +79,7 @@ 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: @@ -86,7 +87,8 @@ Currently, Flipt Cloud only support client-side SDKs for direct evaluation via t evaluationClient, _ := flipt.NewClient( flipt.WithURL("https://-.flipt.cloud"), flipt.WithClientTokenAuthentication(), - flipt.WithNamespace() + flipt.WithNamespace(), + flipt.WithFetchMode(flipt.FetchModeStreaming), ) ``` diff --git a/cloud/overview.mdx b/cloud/overview.mdx index 54e7b26..246f7fe 100644 --- a/cloud/overview.mdx +++ b/cloud/overview.mdx @@ -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. diff --git a/integration/client.mdx b/integration/client.mdx index 3fc7dc7..b1803d3 100644 --- a/integration/client.mdx +++ b/integration/client.mdx @@ -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! + +## 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. + + + Flipt Cloud is a fully managed feature management platform that enables you to + continue to use Flipt's feature management capabilities with zero maintenance. + + +Streaming is available for all Flipt Cloud plans, even the free tier. diff --git a/integration/overview.mdx b/integration/overview.mdx index 8631322..5ba595a 100644 --- a/integration/overview.mdx +++ b/integration/overview.mdx @@ -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. + + 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. + + Reasons for using client-side evaluation include: - You want to reduce the number of requests your application makes to Flipt for feature flag evaluations