Self-Hosting and Open Source
Experimentation is in beta.
Experimentation works in both the Open Source version and the Enterprise Edition, with no edition restriction. Self-hosted Flagsmith can store experiment events in two ways.
Flagsmith database
Events are stored in the PostgreSQL database Flagsmith already runs on, and the SDKs send them to your Flagsmith API.
- Needs only the Flagsmith API; there is nothing extra to run.
- Only works when your Flagsmith database is PostgreSQL.
- Events share your application database, so they add to its size, backups and load.
To set it up, see Self-hosted: use the Flagsmith database.
Your own warehouse
Events are delivered to your own ClickHouse, Databricks or PostgreSQL.
- Also run the event ingestion service, Kafka and warehouse delivery. See Deploying.
- Suits higher event volumes. See Sizing experimentation.
Turning it on
Set EXPERIMENTATION_ENABLED=true on the Flagsmith API. The Warehouse tab doesn't appear without it. See
environment variables.
SDK events URL
By default, the SDKs send events to Flagsmith Cloud. Set each SDK's events URL to:
- Flagsmith database: your Flagsmith API URL ending in
/api/, for examplehttps://flagsmith.example.com/api/. - Your own warehouse: your event ingestion service's public URL, for example
https://events.flagsmith.example.com/.
The SDKs append v1/events themselves. See Initialise for each SDK.
Things to know
- Events with a timestamp more than 10 days in the past or 24 hours in the future are rejected.
- A batch over 2 MiB is rejected whole.
- Flagsmith never deletes events. Monitor the size of your database or warehouse.
Deploying
- Docker: the
docker-compose.ymlruns every experimentation service, with a local ClickHouse. - Kubernetes and OpenShift: the Helm chart runs the ingestion service and warehouse delivery, with your own Kafka and warehouse.
The source for the event ingestion service and warehouse delivery is on GitHub.