Inside Atlassian's Forge Billing Architecture for Distributed Usage Tracking at Scale
Atlassian has detailed the engineering complexities involved in building its Forge billing platform, a critical system supporting usage-based pricing across its cloud application development ecosystem. The Forge platform itself is described as a serverless extensibility platform, enabling developers to build applications for Atlassian products like Jira and Confluence. The billing architecture is specifically engineered to handle the challenges of distributed usage tracking at scale.
The primary function of this architecture is to accurately translate a multitude of distributed usage signals into precise financial records. This involves collecting high-volume usage events generated by independent Forge services. A key challenge addressed by the system is ensuring that these events are consistently validated, correctly attributed to the appropriate tenant or subscription context, and transformed into billing-ready data without any loss or duplication.
The high-level architecture comprises several interconnected components. At the forefront are the Forge services themselves, which are responsible for emitting structured usage events. These events then flow into a centralized ingestion and streaming layer, which is built upon Kafka-based systems and internal delivery abstractions. This layer plays a crucial role in enforcing schema validation and guaranteeing reliable delivery to subsequent consumers in the pipeline.
A central element of the system is the Usage Tracking Service (UTS). Atlassian describes UTS as the 'nervous system' for Forge Billing, acting as a coordination layer for incoming usage data. Its responsibilities include validating, normalizing, enriching, and preparing these events for the billing workflows. UTS also ensures that usage data is consistently attributed to the correct entitlement or subscription context before it is persisted and passed downstream to billing and commerce systems.
Furthermore, the architecture provides near real-time visibility for developers, allowing them to monitor usage effectively. The data is stored in layered systems, featuring immutable long-term storage for auditability and a low-latency analytical layer for dashboards and APIs. This comprehensive approach enables scalable and transparent billing, backed by strong guarantees of correctness and traceability across the distributed services.
Read original source