Skip to content

Silent Authentication Load Test

Test Overview

ItemDetails
Test DateDecember 11, 2025
Target EndpointGET /authorize?prompt=none
PurposeMeasure maximum throughput and performance limits for silent authentication

Test Environment

K6 Cloud Configuration

ComponentDetails
Load GeneratorK6 Cloud (amazon:us:ashburn)
Targethttps://conformance.authrim.com
ProtocolHTTPS with PKCE (S256)

Infrastructure

ComponentTechnology
ComputeCloudflare Workers
StateDurable Objects (Sharded)
DatabaseCloudflare D1
CacheCloudflare KV

Sharding Configuration

Durable ObjectStandardExtended
AuthorizationCodeStore64128
SessionStore64128
TokenStore4864

Test Methodology

Scenario

  1. Pre-create 500 user sessions via Admin API
  2. Each VU picks a random session and performs silent auth
  3. Success criteria: HTTP 302 redirect with code parameter

Load Pattern

{
executor: 'ramping-arrival-rate',
startRate: 0,
timeUnit: '1s',
preAllocatedVUs: 2500,
maxVUs: 3500,
stages: [
{ target: 1000, duration: '15s' }, // ramp-up
{ target: 2000, duration: '180s' }, // sustain
{ target: 0, duration: '15s' }, // ramp-down
],
}

Test Duration

  • Ramp-up: 15-20 seconds
  • Sustain: 180 seconds
  • Ramp-down: 15-20 seconds
  • Total: ~3.5 minutes per RPS target

Test Configuration

Authentication Flow

ParameterValue
response_typecode
promptnone
code_challenge_methodS256
Session SourcePre-created cookies

Success Criteria

  • HTTP 302 status code
  • code parameter in redirect URL
  • No HTTP failures

Results - Performance Metrics

Summary (64 Shards)

RPSTotal RequestsHTTP FailuresCF DO ErrorsStatus
50073,124013
1,000146,24900
1,500219,37400
2,000292,49900
2,500365,62400
3,000445,37800
3,500521,64600
4,000599,4401601,223⚠️

128 Shards Test

RPSHTTP FailuresCF DO ErrorsStatus
4,00002,112
4,5002871,376⚠️

Effect: 128 shards achieved zero HTTP failures at 4,000 RPS (vs 160 failures with 64 shards)

K6 Client Latency (ms)

RPSP50P95P99Max
500406.62453.68535.931,802
1,000403.44453.39528.182,978
1,500404.12471.06529.633,320
2,000404.65451.84528.253,014
2,500652.44793.59837.715,181
3,0001,243.491,582.821,641.735,482
3,500614.851,631.441,727.458,077
4,000458.43668.645,621.6858,618

Results - Infrastructure Metrics

Worker Duration (ms)

RPSP50P75P90P99P999
50048.1449.9651.2768.10141.93
1,00049.4450.4551.7970.15155.28
2,00049.7450.8652.1568.27157.83
2,50082.86101.78116.63134.59157.84
3,000157.24180.27194.63222.03254.70
3,50076.16148.35193.47231.27257.43
4,00050.2356.2674.84175.813,750.00

Worker CPU Time (ms)

RPSP50P75P90P99P999
5002.242.783.238.0121.93
1,0002.352.783.1710.4723.27
2,0002.342.833.456.4020.30
3,0002.252.853.555.8017.38
4,0002.272.833.5313.6815.55

Key Finding: CPU time remains stable (2-3ms P50) regardless of RPS

Durable Objects Wall Time (ms)

RPSTotal DO ReqDO ErrorsP50P75P90P99
500186,52013122.04180.60320.991,779
1,000399,2820170.87179.58189.45556
2,000747,0730169.92177.78183.42321
2,5001,097,6680180.54193.23408.75645
3,0001,336,6940183.39731.481,040.331,312
3,5001,565,2630178.94190.19690.621,381
4,0001,796,5561,223172.92182.15190.99442

Sharding Analysis

64 vs 128 Shards at 4,000 RPS

Metric64 Shards128 ShardsImprovement
HTTP Failures1600✅ Eliminated
clientDisconnected1600✅ Eliminated
DO Errors1,2232,112⚠️ Increased
Max Error-Free RPS3,5004,000+500 RPS

Note: DO Errors increased due to cold start costs of new shards. This stabilizes after warm-up.

128 Shard Configuration Details

RPSWorker P99DO P99
4,000812ms1,301ms
4,5003,750ms (timeout)1,445ms

Capacity Recommendations

UsageRecommended RPSRationale
Normal Operation≤2,000P99 < 600ms, 0% errors
Peak Handling≤3,000P99 < 1,700ms, 0% errors
Absolute Limit≤3,500P99 < 1,800ms, 0% DO errors
Hard Limit (128 shards)~4,000HTTP failures begin

Key Findings

1. Worker is Lightweight

CPU time is 2-3ms P50 across all RPS levels - the Worker code itself is not the bottleneck.

2. DO Queuing is the Bottleneck

At high RPS, DO wall time increases dramatically due to request queuing, not processing time.

3. 3,500 RPS Achieved with Zero Errors

With 64 shards, the system handles 3,500 RPS with no HTTP failures and no DO errors.

4. Sharding Extends Capacity

Increasing from 64 to 128 shards pushes the error-free limit from 3,500 to 4,000 RPS (+14%).

5. 4,500 RPS is the Hard Ceiling

Even with 128 shards, 4,500 RPS causes timeouts (Worker Duration hits 3.75s ceiling).

Performance Visualization

xychart-beta
    title "RPS vs K6 P95 Latency (ms)"
    x-axis [500, 1000, 1500, 2000, 2500, 3000, 3500, 4000]
    y-axis "Latency (ms)" 0 --> 2000
    bar [454, 453, 471, 452, 794, 1583, 1631, 669]

Note: 4,000 RPS value (669ms) excludes timeout requests. Latency begins rising at 2,500 RPS.

Bottleneck Analysis

Layer500-2000 RPS2500-3500 RPS4000 RPS
Worker CPUStable (2-3ms)Stable (2-3ms)Stable (2-3ms)
Worker DurationStable (50ms)Rising (80-160ms)Spike
DO Wall TimeStable (170-320ms)Rising (600-1400ms)Errors
VerdictHeadroomUnder loadAt limit

Test Execution Details

K6 Cloud Run URLs

RPSK6 Cloud URL
500https://authrim.grafana.net/a/k6-app/runs/6297034
1,000https://authrim.grafana.net/a/k6-app/runs/6297223
2,000https://authrim.grafana.net/a/k6-app/runs/6297317
3,000https://authrim.grafana.net/a/k6-app/runs/6297364
4,000https://authrim.grafana.net/a/k6-app/runs/6298253
4,000 (128)https://authrim.grafana.net/a/k6-app/runs/6298610

Conclusion

Authrim’s Silent Authentication endpoint achieves:

  • 64 shards: 3,500 RPS with zero errors
  • 128 shards: 4,000 RPS with zero errors (+14% improvement)

Recommended Settings:

  • Normal operation: 64 shards (up to ~3,000 RPS)
  • High load: 128 shards (up to ~4,000 RPS)

The Cloudflare Workers + Durable Objects architecture demonstrates effective horizontal scaling through DO sharding. However, 128 shards appears to be a practical upper limit due to cold start overhead.