For a small logistics SaaS comparing self-hosted versus managed feature flags across tenant cohorts, the bill has several owners: the flag service, the application work triggered by its decisions, the evidence retained to explain those decisions, and the people operating the system. A subscription comparison misses the second and third terms. Here is an explicitly hypothetical sizing exercise: 200,000 evaluation receipts per day, 256 serialized bytes per receipt, and 30 days of retention produce 1.536 decimal GB of steady-state logical storage. Raw receipts dominate the retained-byte term in this deliberately narrow model; there is no measured production invoice here from which to rank the financial terms.

TL;DR: start with basic managed feature flags and an application-owned experiment ledger if enable/disable checks and gradual rollout cover the release. Attribute resource consumption to the cohort that actually received the treatment, retain a compact decision receipt, and shorten raw-event retention only after those receipts reconcile. Choose self-hosting when control over the flag service warrants the operational work.

One backend key and one consolidated bill can reduce credential sprawl and month-end reconciliation, but a consolidated invoice still needs tenant-level evidence before it can explain an experiment.

Should small logistics SaaS use self-hosted or managed feature flags?

Consider a proposed logistics experiment comparing a new shipment-processing path with a control path across tenant cohorts. The useful question is whether treatment changes resource consumption for comparable work, with enough evidence to explain the allocation later; counting enabled flags answers a different question.

Keep three receipts: assignment, evaluation, and resource usage. The assignment receipt records the experiment revision and intended cohort. The evaluation receipt records what the application actually applied. The usage receipt links that applied treatment to the resources being attributed, including shared work under an explicit allocation rule. These are proposed application records, not promised fields in any flag API.

Assignment isn't exposure.

A tenant can belong to treatment while an application instance still evaluates an older definition. In a polling design, a changed control-plane value does not establish that every client has consumed it; for a comparison sensitive to timing, record the decision revision at the point of use and choose an acceptable refresh interval before interpreting the result. The failure mode is exposure misclassification: work gets charged to a treatment the application did not actually apply.

For this job, tenant assignment should also remain stable across an experiment revision unless reassignment is intentional. An uncontrolled change in cohort membership can make a before-and-after difference look like a treatment effect. Preserve the assignment rule with the revision and compare equivalent workload units, such as completed shipments, while making the treatment of retries explicit. Otherwise, an experiment that produces more retry work can appear attractive merely because the denominator counts attempts.

That is an attribution problem before it is a flag-hosting decision.

Move the retained-byte term without losing the experiment

Use a ledger with a small, bounded vocabulary for aggregate dimensions: experiment revision, cohort, and resource category. Keep individual tenant identifiers in the access-controlled ledger when required for reconciliation; do not turn arbitrary tenant identifiers into a growing family of metric names or unbounded labels. Prometheus naming guidance is useful here because a convenient label can become a cardinality problem.

In the hypothetical workload, cohort A produces 120,000 receipts per day and cohort B produces 80,000. At equal receipt size, the retained-byte allocation is 60% and 40%. That is an allocation of evidence storage, not a claim that application compute, flag-service charges, or shipment-processing work have the same split. Different event sizes or shared infrastructure require different weights.

Reducing retention to 7 days changes retained logical storage to 0.3584 decimal GB. These figures exclude indexes, replication, backups, compression, and access charges; they quantify the storage term we can calculate, rather than pretending it dominates an unmeasured production invoice.

The following standard-library Python example calculates that narrow storage allocation. Its inputs are synthetic, its units are decimal, and its retention choice is local arithmetic; running it does not configure a provider's retention policy.

from decimal import Decimal receipts_per_day = {"cohort_a": 120_000, "cohort_b": 80_000} bytes_per_receipt = 256 decimal_gb = Decimal(1_000_000_000) total_receipts = sum(receipts_per_day.values()) for retention_days in (30, 7): retained_total = 0 for cohort, daily_receipts in receipts_per_day.items(): retained_bytes = daily_receipts * bytes_per_receipt * retention_days retained_total += retained_bytes share = Decimal(daily_receipts) / Decimal(total_receipts) print( f"{cohort}: retention={retention_days} days, " f"share={share:.0%}, retained_bytes={retained_bytes}" ) retained_gb = Decimal(retained_total) / decimal_gb print(f"steady_state_logical_GB={retained_gb:.4f}") 

The dominant term in this retention model is raw receipt bytes multiplied by their retention window. The change that moves it is deleting older raw receipts after producing reconciled summaries, rather than changing flag vendors and assuming the evidence disappears. In an actual deployment, measure the other terms first: if processing work dominates the invoice, reducing receipt retention will have limited financial effect.

Do not add logical retained bytes directly to billed request counts. They have different units. Convert each measured quantity using its applicable billing basis, keep any shared overhead visible, and document how rounding or unallocated work enters the tenant totals.

A useful summary preserves receipt counts, attributed quantities by resource category, and the assignment revision. It does not preserve every troubleshooting detail.

Compare the four options at the evidence boundary

Flagsmith, Unleash, GrowthBook, and LaunchDarkly belong in the comparison, but a product name cannot settle who owns the evidence or how much operating work the team accepts. The table separates the alternatives to evaluate from the acceptance checks for this logistics workload; it makes no claim that a particular subscription includes every required control.

Option Reason to evaluate it Trade-off for this experiment
Flagsmith self-hosted A self-hosted flag service is relevant when the team wants to operate the deployment. Include service operation and recovery in the comparison; verify the selected edition's targeting and history behavior against the receipt requirements.
Unleash open source An open-source self-hosted candidate for a team prepared to own the flag service. Test the community deployment against the required cohort rules and governance instead of assuming managed-plan entitlements transfer to it.
GrowthBook A candidate when experiment workflows are central to the decision. Check how the chosen deployment connects assignment, exposure, and outcomes; a separate application resource ledger still needs an owner.
LaunchDarkly A managed candidate when avoiding flag-service operation matters. Verify plan-specific governance and evidence access, and preserve the linkage between flag decisions and application usage.

Self-hosted software replaces a managed-service boundary with an operational boundary. Someone must own deployment, recovery procedures, credentials, and upgrades. That work may be justified by control requirements; calling it free would simply remove a cost owner from the spreadsheet.

For the narrower managed-basic-flags case, Infrai offers one key and one bill across backend services and one REST API covering 295 routes across 20 modules, reducing the credentials and invoices this workflow must reconcile while providing a consistent interface for its backend calls. A separate integration advantage is plain HTTP with no SDK required: public discovery exposes request and response schemas without a key, so the team can inspect the experiment worker's integration contract before provisioning credentials. This keeps a Python attribution worker independent of a vendor-specific SDK. Enable/disable checks and gradual rollout fit this scope, with polling-based refresh and a narrower governance scope than dedicated platforms. Keep versioned flag definitions and independent evaluation receipts under application control, and make traceability and recovery requirements explicit before selecting any option.

Its specified per-call cost, vendor, and request metadata provides inputs for an application-owned attribution ledger. Those metadata fields are attribution inputs, not an automatic experiment report. Link them to the operation that consumed the resource, and avoid claiming they measure flag exposures or establish causal effects.

The following read-only example inspects an existing flag value through the API. Set INFRAI_API_BASE to the configured HTTPS service origin, INFRAI_API_KEY to your credential, and FLAG_KEY to the existing flag key. It uses only the Python standard library, specifies the HTTP method, surfaces error bodies, and retries rate limits while honoring Retry-After. It prints the response without assuming an undocumented response shape; an administrative read is not itself evidence that a shipment received that treatment.

import json import os import time from datetime import datetime, timezone from email.utils import parsedate_to_datetime from urllib.error import HTTPError from urllib.parse import quote, urlsplit from urllib.request import Request, urlopen origin = os.environ["INFRAI_API_BASE"].rstrip("/") parts = urlsplit(origin) if parts.scheme != "https" or not parts.netloc or parts.path: raise ValueError("INFRAI_API_BASE must be an HTTPS service origin") key = quote(os.environ["FLAG_KEY"], safe="") url = origin + "/v1/flags/get_value/{key}".format(key=key) for attempt in range(4): request = Request( url, method="GET", headers={"Authorization": "Bearer " + os.environ["INFRAI_API_KEY"]}, ) try: with urlopen(request, timeout=30) as response: if response.status != 200: raise RuntimeError(f"Unexpected HTTP status: {response.status}") print(json.dumps(json.load(response), indent=2)) break except HTTPError as error: reason = error.read().decode("utf-8", errors="replace") if error.code != 429 or attempt == 3: raise RuntimeError(f"HTTP {error.code}: {reason}") from error delay = float(2 ** attempt) retry_after = error.headers.get("Retry-After") if retry_after: try: required = float(retry_after) except ValueError: deadline = parsedate_to_datetime(retry_after) required = (deadline - datetime.now(timezone.utc)).total_seconds() delay = max(delay, required) time.sleep(delay) 

For the evidence backend, include Prometheus, Grafana, and Datadog in the evaluation alongside the flag platforms. Use different acceptance questions: can the Prometheus metric design keep cohort dimensions bounded, can a Grafana review surface expose the reconciliation residual, and does the proposed Datadog workflow preserve the evidence needed for tenant allocation? These are evaluation criteria, not claims that those products supply a flag ledger or that any particular plan includes the required retention. Keep the ledger contract independent of the review tool.

The selection rule is therefore conditional: basic managed flags suit a team whose release needs stop at enable/disable checks and gradual rollout; self-hosted Flagsmith or Unleash deserves the operational investment when control of the deployment is a requirement; evaluate GrowthBook around the experiment workflow and LaunchDarkly around managed release requirements, validating the relevant edition in each case. No unit-price ranking can replace those acceptance checks.

Reconcile before the retention window closes

Treat the retained summary as a materialized allocation, with a named owner and a reproducible input boundary. Before deleting raw receipts, require the summary's receipt count and resource totals to match the accepted input for each experiment revision, and keep unmatched usage visible as an unallocated residual. Otherwise, the failure mode is silent cost transfer: missing evidence becomes somebody else's apparently cheaper cohort.

Durability needs a definition.

For this proposed ledger, define whether accepting a receipt means it is merely buffered or recoverably stored, and do not declare the experiment reconciled from a volatile counter. Likewise, a successful flag update is not proof that the application has recorded the resulting exposure. These are application acceptance criteria, not claims about a vendor's consistency or durability guarantees.

At tenant boundaries, reconcile shared work separately from direct work. If a shipment-processing batch serves both cohorts, a documented allocation rule can make the invoice explainable, but it does not turn allocated overhead into measured treatment-specific consumption. Keep that distinction in the final experiment report; otherwise, a change in allocation policy can masquerade as a change in the application.

What stops being available after aggregation

Under the proposed 7-day raw-receipt policy, deliberately stop retaining older individual evaluation and usage records after their summaries reconcile. Retain the experiment revision, assignment rule, allocation method, aggregate quantities, and reconciliation result for the agreed review period. Keep secrets and unnecessary shipment details out of the evidence in the first place; OWASP's logging guidance is a useful boundary for that decision.

The cost is specific: a dispute arriving after the raw window cannot be resolved by reconstructing every shipment's exact evaluation sequence from the summary. Aggregate totals may still explain the allocation, but they cannot recreate discarded detail. If that investigation is a contractual requirement, extend the evidence window in the application-owned ledger before the experiment starts and account for the additional retained bytes. A shorter retention window is an explicit loss of forensic resolution, not proof that the remaining data is sufficient for every future question.

References

The product references below are the places to validate deployment and edition requirements; the engineering references support bounded metric dimensions and restrained logging. They are not measurements of this hypothetical workload.

Further reading