Skip to content

Add load-test harness and money-path backpressure - #504

Merged
josephchimebuka merged 1 commit into
TevaLabs:mainfrom
kalbliz:feat/load-test-backpressure-500
Aug 25, 2026
Merged

Add load-test harness and money-path backpressure#504
josephchimebuka merged 1 commit into
TevaLabs:mainfrom
kalbliz:feat/load-test-backpressure-500

Conversation

@kalbliz

@kalbliz kalbliz commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Repeatable npm run test:load profiles for authenticated bets, duplicate idempotency keys, concurrent round reads, and overload.
  • Money-path overload now returns controlled 429 (rate limit) or 503 (in-flight cap / open circuit breaker) with Retry-After, instead of cascade 500s.
  • IP rate limiters key by address (not request objects), so the bet limiter actually fires.

Closes #500

Test plan

  • npm run test:load locally (11/11 passed)
  • CI load/unit jobs on this PR
  • Confirm POST /api/bets/up-down burst returns 429 after the per-IP cap, never 500
  • Confirm open Soroban breaker / in-flight cap maps to 503 + Retry-After
  • Confirm duplicate Idempotency-Key burst creates one bet

Local npm run test:load sample

[LOAD] bet overload 429
  statuses: 200x3 429x9  errorRate=0.0%
[LOAD] auth bet throughput
  total=16 success=16 fail=0  p95=111ms
[LOAD] duplicate idempotency
  total=16 success=16 fail=0
[LOAD] read rounds throughput
  total=30 success=30 fail=0  p95=30ms

@kalbliz
kalbliz force-pushed the feat/load-test-backpressure-500 branch 4 times, most recently from b593063 to 7444441 Compare August 23, 2026 19:49
… 429/503.

IP rate limiters now key by address instead of request objects, bets cap in-flight Soroban calls, and npm run test:load covers auth bets, idempotency, and graceful overload.

Closes TevaLabs#500
@josephchimebuka
josephchimebuka merged commit 6372195 into TevaLabs:main Aug 25, 2026
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add load-test harness and backpressure limits for bet/prediction hot paths

2 participants