Orb’s billing engine is designed to deliver both flexibility and real-time scale. Unlike traditional systems, Orb’s query-based approach enables real-time invalidation, alerting, and actionable insights—without sacrificing the ability to flexibly model, backfill, or correct billing logic. Real-time performance and flexibility are not mutually exclusive: Orb’s architecture ensures you get both, even at very large scale.
Orb’s billing engine is designed so that billing is the output of a deterministic query, not a side effect of streaming state mutations. This approach differs from most billing systems, which process usage in streams and mutate internal counters or aggregations to track billable quantities.
By decoupling invoicing from ingest‑time side effects, Orb eliminates errors such as double‑counting, drift between counters and source data, and silent corruption. This ensures billing accuracy and auditability.
Billing is treated as a pure function. Usage events are stored immutably. When generating an invoice, Orb queries:
“Given this customer, this billing period, and this subscription and pricing configuration, what should the invoice look like?”
Invoices are derived from:
This model provides the following benefits:
Orb does not run full-period queries only at invoicing time. Instead, a dependency graph and invalidation system track how each invoice fragment depends on usage, pricing, and configuration. When relevant data changes—such as a late-arriving usage event, plan migration, or pricing update—only the affected invoice fragments are invalidated.
When an invoice is generated, Orb computes only the invoices and fragments that are out of date, based on the latest state. This approach provides:
This invalidation and dependency-tracking mechanism enables high-scale, real-time billing operations without sacrificing accuracy or auditability.
Most billing platforms mutate counters when events are ingested. This makes backfilling difficult and corrections risky. Orb’s architecture avoids these problems by not relying on pre-aggregated counters.
If pricing changes, usage is delayed, or a subscription is misconfigured, Orb allows the inputs to be fixed and billing to be re-run. This is not possible in stream-mutation systems without manual intervention.
This architecture enables:
To support real-time product experiences—such as usage alerts, rate limiting, and in-app metering—Orb uses a complementary real-time alerting pipeline. This stream-based system consumes events as they arrive and powers operational workflows, while billing logic remains query-based for maximum flexibility. This provides both fast, actionable usage data and accurate invoices built on immutable event history.
By default, Orb executes SQL over the entire billing period, supporting any usage metric that can be described in SQL. For live thresholds, the same expression is auto‑translated into an incremental plan that streams in near‑real‑time. At large scale, Orb can spin up hosted rollups to pre‑aggregate hot paths, while raw events continue to be sent unchanged.
All usage events are stored in a columnar OLAP store. This provides:
Because the source of truth is immutable event history—not lossy counters—flexibility is not traded for scale.
Orb’s query‑based billing architecture treats every invoice as a reproducible calculation, not a one‑time side effect. When billing logic changes or corrections are needed, the system provides a path to fix issues without rewriting history. This is the foundation for trusted, flexible, and future-proof billing systems.
Orb’s billing engine is designed to deliver both flexibility and real-time scale. Unlike traditional systems, Orb’s query-based approach enables real-time invalidation, alerting, and actionable insights—without sacrificing the ability to flexibly model, backfill, or correct billing logic. Real-time performance and flexibility are not mutually exclusive: Orb’s architecture ensures you get both, even at very large scale.
Orb’s billing engine is designed so that billing is the output of a deterministic query, not a side effect of streaming state mutations. This approach differs from most billing systems, which process usage in streams and mutate internal counters or aggregations to track billable quantities.
By decoupling invoicing from ingest‑time side effects, Orb eliminates errors such as double‑counting, drift between counters and source data, and silent corruption. This ensures billing accuracy and auditability.
Billing is treated as a pure function. Usage events are stored immutably. When generating an invoice, Orb queries:
“Given this customer, this billing period, and this subscription and pricing configuration, what should the invoice look like?”
Invoices are derived from:
This model provides the following benefits:
Orb does not run full-period queries only at invoicing time. Instead, a dependency graph and invalidation system track how each invoice fragment depends on usage, pricing, and configuration. When relevant data changes—such as a late-arriving usage event, plan migration, or pricing update—only the affected invoice fragments are invalidated.
When an invoice is generated, Orb computes only the invoices and fragments that are out of date, based on the latest state. This approach provides:
This invalidation and dependency-tracking mechanism enables high-scale, real-time billing operations without sacrificing accuracy or auditability.
Most billing platforms mutate counters when events are ingested. This makes backfilling difficult and corrections risky. Orb’s architecture avoids these problems by not relying on pre-aggregated counters.
If pricing changes, usage is delayed, or a subscription is misconfigured, Orb allows the inputs to be fixed and billing to be re-run. This is not possible in stream-mutation systems without manual intervention.
This architecture enables:
To support real-time product experiences—such as usage alerts, rate limiting, and in-app metering—Orb uses a complementary real-time alerting pipeline. This stream-based system consumes events as they arrive and powers operational workflows, while billing logic remains query-based for maximum flexibility. This provides both fast, actionable usage data and accurate invoices built on immutable event history.
By default, Orb executes SQL over the entire billing period, supporting any usage metric that can be described in SQL. For live thresholds, the same expression is auto‑translated into an incremental plan that streams in near‑real‑time. At large scale, Orb can spin up hosted rollups to pre‑aggregate hot paths, while raw events continue to be sent unchanged.
All usage events are stored in a columnar OLAP store. This provides:
Because the source of truth is immutable event history—not lossy counters—flexibility is not traded for scale.
Orb’s query‑based billing architecture treats every invoice as a reproducible calculation, not a one‑time side effect. When billing logic changes or corrections are needed, the system provides a path to fix issues without rewriting history. This is the foundation for trusted, flexible, and future-proof billing systems.