Case study / Developer tools
Usage-based billing for a fast-growing API platform
Usage-based billing, rate limiting, and a developer portal for a platform that went from 40 million to 320 million API calls a month.
- Client
- Relay
- Sector
- Developer tools
- Year
- 2025
- Scope
- 3 services
- Services
- Cloud & APIs / Web platform / Data engineering
Relay / Developer tools
Case study / 2025
01
240ms
p95 API latency
02
8×
Throughput headroom
03
99.98%
Gateway uptime
Context
The problem we found
The API platform had pricing held together by cron jobs and a spreadsheet. Every enterprise contract needed custom work, and the team could not say what a customer used last month.
Method
How we worked
Four decisions that shaped the build.
- 01
Designed an idempotent metering pipeline with an append-only event log and replayable aggregation.
- 02
Built a policy engine for quotas, overages, and contract-specific pricing.
- 03
Replaced the internal admin tooling with a self-serve developer portal.
- 04
Load-tested the billing path at eight times current traffic before the first enterprise cutover.