concurrent-load-testing-pattern

Measure throughput and p50/p95/p99 latency for concurrent LLM API requests.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/saintgo7/claude-skills --skill concurrent-load-testing-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: concurrent-load-testing-pattern
Source: https://github.com/saintgo7/claude-skills/tree/main/concurrent-load-testing-pattern
Command: npx skills add https://github.com/saintgo7/claude-skills --skill concurrent-load-testing-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires asyncio, httpx, locust.

What problem does it solve?

Concurrency load testing for APIs/LLM gateways often produces misleading results if you only look at average latency or hit rate limits, making it hard to know where the real throughput ceiling is.

Core Features & Use Cases

  • Async concurrency measurement (asyncio.gather + httpx): run deterministic, CI-friendly benchmarks to compute p50/p95/p99 latency and RPS precisely.
  • Locust-based distributed verification: produce dashboard-friendly reports and validate results against the asyncio method.
  • Key distribution + RPS ceiling methodology: use multiple keys to avoid RPM throttling and ramp concurrency to detect the throughput “knee”.
  • Capacity decision metrics: combine RPS/TPS, success rate, p99 latency, and basic GPU/memory signals to decide sustainable concurrency.

Quick Start

Run a targeted concurrent load test and generate a benchmark report by providing multiple API keys via KEY_LIST and setting a target concurrency and requests-per-user.

Frequently Asked Questions about concurrent-load-testing-pattern

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I measure p99 latency and throughput for concurrent LLM API requests?

Measuring p99 latency and throughput for concurrent LLM API requests involves running deterministic asyncio benchmarks with httpx to ramp concurrency and calculate precise p50/p95/p99 distributions alongside RPS.

Why does my API load testing show misleading average latency under high concurrency?

Your API load testing shows misleading average latency because it hides tail latencies and often hits rate limits. Using p50/p95/p99 metrics with multi-key distribution avoids RPM throttling and reveals the true throughput ceiling.

What is the best way to find the RPS ceiling of an LLM gateway without rate limit distortion?

Finding the RPS ceiling of an LLM gateway without rate limit distortion requires distributing requests across multiple API keys and ramping concurrency until detecting the throughput knee using p99 latency and success rate.

Can I use locust to cross-validate asyncio httpx benchmarking results?

You can use locust to cross-validate asyncio httpx benchmarking results by running distributed verification to generate dashboard-friendly reports and confirm capacity metrics captured during deterministic async tests.

Do I need multiple API keys to perform reliable concurrency load testing?

You need multiple API keys for reliable concurrency load testing because distributing requests via a KEY_LIST avoids RPM throttling distortion, ensuring accurate capacity assessment and sustainable concurrency decisions.

How do I set SLOs for LLM serving using capacity testing metrics?

Setting SLOs for LLM serving using capacity testing metrics involves combining RPS/TPS, success rate, and p99 latency with basic GPU/memory signals during load ramping to decide maximum sustainable concurrency levels.