GO Feature Flag
repository·main·Indexed 24 days ago
https://github.com/thomaspoignant/go-feature-flagA lightweight, self-hosted, and open-source feature flag solution for cloud-native environments. It supports the OpenFeature standard and provides a CLI for evaluating and linting flags, a Relay Proxy for language-agnostic HTTP access, and an Editor Playground API for testing. It supports multiple configuration retrievers including file, http, github, gitlab, s3, googleStorage, configmap, mongodb, bitbucket, azureBlobStorage, and postgresql.
What's inside go-feature-flag
- GO Feature Flag is a lightweight, open-source, and self-hosted feature flag solution. It was originally designed for the Go language but has expanded to support multiple languages via the OpenFeature standard through a hosted relay proxy. It allows developers to manage feature flags with minimal setup and supports complex targeting and rollout strategies.
Overview of GO Feature Flag (GOFF)
mainGO Feature Flag (GOFF) is an OpenFeature-native, self-hosted feature flagging solution designed for simplicity and GitOps workflows. Unlike many alternatives, it does not require a database to operate; instead, it retrieves flag configurations (YAML, JSON, or TOML) and keeps them in memory.
Key Characteristics
- Deployment: Extremely simple to install. Run a single Go binary and point it at your configuration source.
- OpenFeature Native: Built from the ground up for OpenFeature with native providers for Go, Node/JS, Python, Java, .NET, PHP, Ruby, Swift/Android, Kotlin, and Web (React/Angular).
- Management: There is no runtime admin dashboard for flag management. Instead, management is GitOps-driven, though a web editor is provided for authoring and validating configurations.
- Evaluation Models:
- Remote Evaluation: Via a relay proxy.
- In-process Evaluation: Using a WebAssembly (Wasm) module embedded directly in the SDKs for local-latency reads.
- Extensibility:
- Exporters: Supports exporting usage analytics to S3, GCS, Azure, Kafka, Kinesis, Pub/Sub, SQS, BigQuery, OpenTelemetry, webhooks, files, and logs.
- Notifiers: Supports change notifications via Slack, Discord, Microsoft Teams, and webhooks.
- License: MIT, fully open with no paywalled enterprise tier.
Overview of GO Feature Flag
mainGO Feature Flag is a lightweight, open-source feature flagging solution designed to decouple deployment from release. It eliminates the need for a complex backend system by using a file as its backend.
Key capabilities include:
- Multiple Flag Types: Evaluate
Bool,String,Int,Double, andJSONflags. - Complex Targeting: Define rules to target specific audiences based on evaluation context.
- Rollout Strategies: Implement progressive rollouts, A/B testing, and scheduled flag updates.
- Multi-language Support: Use the same flag configuration across different languages via the OpenFeature standard.
- Flexible Storage: Store configurations in various locations such as K8S ConfigMaps, S3, Azure Blob Storage, GitHub, etc.
- Observability: Export evaluation data for analysis and receive notifications when flag configurations change.
- Multiple Flag Types: Evaluate
GO Feature Flag support for Server and Client paradigms
mainGO Feature Flag is designed to support both paradigms, allowing you to use the same feature flags across both server and client applications. The project aims to provide top-level support for all major programming languages.Use the PHP Provider for OpenFeature
mainThe
openfeature-go-feature-flag-provideris designed to work with the OpenFeaturephp-sdk. It allows you to integrate the Go Feature Flag engine into your PHP applications using the standardized OpenFeature API.Note: This provider is maintained in the OpenFeature Contrib repository rather than the main repository.
Supported Languages and Protocols
mainGO Feature Flag provides support for both Client-side and Server-side paradigms across various languages via OpenFeature providers. It also supports the OpenFeature Remote Evaluation Protocol (OFREP), which is a standardized protocol for feature flag evaluation.Understand the GO Feature Flag relay proxy API
mainThe GO Feature Flag relay proxy provides a REST API used to evaluate feature flags remotely. This API is primarily consumed by OpenFeature providers to fetch flag configurations and evaluations. The full API specification is documented in OpenAPI format.Compare GO Feature Flag rollout strategies
mainGO Feature Flag provides four primary rollout strategies to manage feature releases. Choose the strategy based on whether you need random variation, automatic progression over time, time-bound experimentation, or structured multi-stage deployment.
Release Option Description Use Case Percentage rollout Controls the percentage of evaluation contexts that receive a specific flag variation. Use for random variations based on evaluation context. Note that if you change the percentage later, a specific customer's variation might change. Progressive rollout The percentage of customers receiving a variation automatically increases over time. Use for random variations where a customer's variation changes only once as the rollout progresses. Experimentation rollout Serves a feature flag for a determined time period and automatically disables it after the end date. Use to test a feature for a specific window and analyze results. Outside this window, users receive the default value. Scheduled rollout A structured, multi-stage approach that automates rollout to specific environments and audiences at specific dates. Use when you need to modify target audiences, add targeting rules, or change percentages at predefined stages. Key capabilities of GO Feature Flag
mainGO Feature Flag provides several core capabilities for managing feature flags:
- OpenFeature Standard: Use the OpenFeature standard in any supported language.
- Flexible Storage: Store flag configurations in various locations including
HTTP,S3,Kubernetes, and more. - Multiple Formats: Configure flags using
JSON,TOML, orYAML. - Complex Targeting: Add rules to target specific users.
- Advanced Rollout Strategies:
- A/B testing experimentation
- Progressive rollouts
- Scheduled flag updates
- Data Export: Export flag usage data to destinations like
S3,Google Cloud Storage,file, orKafka. - Notifications: Receive notifications via
webhookorslackwhen flags change. - Full-Stack Support: Supports backend, frontend, and mobile applications.
Explore GO Feature Flag usage pathways
mainGO Feature Flag provides multiple ways to integrate feature flagging into your applications, including direct module usage, OpenFeature SDK integration, and server-side deployments. You can choose a pathway based on your runtime (Go, Node.js, React, Kotlin, Swift, Python) or your infrastructure (Kubernetes, AWS, GitHub, MongoDB, S3).Understand the Node.js OpenFeature integration example
mainThis example demonstrates how to integrate GO Feature Flag into a Node.js application using the OpenFeature SDK and the GO Feature Flag provider.
Key components of the demo:
- Relay Proxy Configuration: Managed via the
goff-proxy.yamlfile. - Flag Configuration: Loaded from the
config.goff.yamlfile. - Evaluation Logic: The application iterates through 6 different evaluation contexts to check the state of a flag named
my-new-feature.
You can observe real-time changes by editing the
config.goff.yamlfile while the application is running; the behavior of the application will update based on the new flag configuration.- Relay Proxy Configuration: Managed via the
Integrate OpenFeature into iOS, macOS, or tvOS applications using swift-provider
mainThe
swift-provideris designed to work with the OpenFeatureswift-sdk. It allows you to integrate feature flagging capabilities into your Apple platform applications (iOS, macOS, tvOS) using the OpenFeature standard.Note: This provider is maintained in its own dedicated repository.