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.

  1. 01

    Designed an idempotent metering pipeline with an append-only event log and replayable aggregation.

  2. 02

    Built a policy engine for quotas, overages, and contract-specific pricing.

  3. 03

    Replaced the internal admin tooling with a self-serve developer portal.

  4. 04

    Load-tested the billing path at eight times current traffic before the first enterprise cutover.

Cloud & APIsWeb platformData engineering
Discuss a project like this

Next step

Tell us how we can help you.

Tell us the constraint. A senior engineer will reply with a clear next step.

Start a project Direct reply from a senior engineer