Skip to content

Load Testing Reports

Authrim’s OAuth 2.0/OIDC endpoints have been rigorously tested using K6 Cloud distributed load testing to verify performance, stability, and zero-error operation under production-like conditions.

Executive Summary

3,500 RPS

Peak Token Operations (Silent Auth)

Zero errors up to 3,500 requests/second for session-based authentication

150 LPS

Full Login Flow

Complete OAuth flow including OTP verification at 150 logins/second

100%

Token Validation Accuracy

Perfect accuracy across all token types (valid, expired, revoked)

0%

Error Rate

Zero HTTP errors within recommended capacity limits

Test Environment

ComponentConfiguration
Load GeneratorK6 Cloud (Amazon US Portland / Tokyo)
TargetCloudflare Workers (conformance.authrim.com)
InfrastructureWorkers + Durable Objects + D1 + KV
Test PeriodDecember 2025
Test Duration3-5 minutes per scenario

Endpoint Capacity Overview

EndpointRecommended RPSPeak RPSLatency P95Details
Silent Auth2,5003,500<500msView Report →
UserInfo2,0002,500<350msView Report →
Token Exchange1,5002,500<300msView Report →
Refresh Token2,5003,000<500msView Report →
Token Introspection300500<350msView Report →
Full Login (OTP)100150<800msView Report →

RPS vs Latency

Silent Authentication with session cookies (prompt=none):

RPSP50P95P99Status
500407ms454ms536ms
1,000403ms453ms528ms
1,500404ms471ms530ms
2,000405ms452ms528ms
2,500652ms794ms838ms
3,0001,243ms1,583ms1,642ms
3,500615ms1,631ms1,727ms
4,000458ms669ms5,622ms⚠️

Configuration: 64 shards, 500 pre-created sessions

Key Findings

1. Sharding is Critical for Scale

Durable Object sharding directly impacts performance at high RPS:

TestShardsResult
Refresh Token @3000 RPS32 → 48DO Errors: 11,972 → 0
Silent Auth @4000 RPS64 → 128HTTP Failures: 160 → 0
Full Login @100 LPS16 → 32DO Errors: 443 → 0

2. Worker CPU is Not the Bottleneck

Across all tests, Worker CPU time remained stable:

  • P50: 2-3ms (all endpoints)
  • P99: 5-15ms (even at peak load)

The bottleneck is Durable Object wall time (queue waiting), not CPU processing.

3. Caching Effectiveness

Cache TypeImpact
JWK Cache (DO)JWT verification stays at 2ms P50
User Cache (KV)D1 reads reduced by 96%
RBAC CacheClaims fetched once per 5 minutes

4. Full Login Flow Breakdown

At 150 LPS, each step contributes:

StepAvgP95
AuthorizeInit106ms129ms
EmailCodeGenerate217ms279ms
EmailCodeVerify260ms336ms
AuthorizeCode68ms88ms
Total652ms756ms

Capacity Recommendations

Conservative (Production)

For SLA-guaranteed operation with P99 < 1 second:

EndpointMax RPSMonthly Volume
Silent Auth2,0005.2 billion
Token Operations2,5006.5 billion
Full Login100260 million

Peak (Burst Traffic)

For short bursts with acceptable latency degradation:

EndpointMax RPSNotes
Silent Auth3,500P99 ~1.7s
Token Operations3,000Zero errors
Full Login150P95 < 800ms

Architecture Impact

flowchart TB
    subgraph K6["K6 Cloud (Distributed)"]
        LZ1["Portland Load Zone"]
        LZ2["Tokyo Load Zone"]
    end

    subgraph CF["Cloudflare Edge"]
        W["Workers"]
        DO["Durable Objects (Sharded)"]
        KV["KV Cache"]
        D1["D1 Database"]
    end

    K6 -->|HTTPS| W
    W --> DO
    W --> KV
    W --> D1
    DO --> D1

Detailed Reports

Each endpoint has a dedicated report with complete test methodology, raw data, and infrastructure metrics: