@@ -2322,6 +2322,7 @@ load-test-agentgateway-mcp-server-time: ## Load test external MCP server (loc
23222322MCP_PROTOCOL_LOCUSTFILE ?= tests/loadtest/locustfile_mcp_protocol.py
23232323MCP_RATE_LIMITER_LOCUSTFILE ?= tests/loadtest/locustfile_rate_limiter_backend_correctness.py
23242324MCP_RATE_LIMITER_SCALE_LOCUSTFILE ?= tests/loadtest/locustfile_rate_limiter_scale.py
2325+ MCP_RATE_LIMITER_REDIS_CAPACITY_LOCUSTFILE ?= tests/loadtest/locustfile_rate_limiter_redis_capacity.py
23252326RL_ALGORITHM ?= fixed_window
23262327RL_USERS ?= 100
23272328RL_SPAWN_RATE ?= 10
@@ -2475,6 +2476,36 @@ benchmark-rate-limiter-scale: ## Scale test: 500 unique users, Red
24752476 --only-summary \
24762477 ScaleComparisonUser || true'
24772478
2479+
2480+ # help: benchmark-rate-limiter-redis-capacity - Multi-instance prompt-path concurrency benchmark for Redis rate limiting
2481+ .PHONY : benchmark-rate-limiter-redis-capacity
2482+ benchmark-rate-limiter-redis-capacity : # # Capacity test: 3 gateways + Redis on prompt_pre_fetch path
2483+ @echo " 🚀 Running rate limiter Redis capacity test..."
2484+ @echo " Host: $( MCP_BENCHMARK_HOST) "
2485+ @echo " Topology: nginx -> 3 gateways -> shared Redis"
2486+ @echo " Path: REST /prompts/{id} (prompt_pre_fetch)"
2487+ @echo " Users: $( RL_USERS) "
2488+ @echo " Spawn rate: $( RL_SPAWN_RATE) /s"
2489+ @echo " Pace: $( RL_REQS_PER_SECOND) req/s per user"
2490+ @echo " Duration: $( RL_RUN_TIME) "
2491+ @test -d " $( VENV_DIR) " || $(MAKE ) venv
2492+ @/bin/bash -eu -o pipefail -c ' source $(VENV_DIR)/bin/activate && \
2493+ LOCUST_LOG_LEVEL=ERROR \
2494+ RL_USERS=$(RL_USERS ) \
2495+ RL_SPAWN_RATE=$(RL_SPAWN_RATE ) \
2496+ RL_RUN_TIME=$(RL_RUN_TIME ) \
2497+ RL_REQS_PER_SECOND=$(RL_REQS_PER_SECOND ) \
2498+ RL_LIMIT_PER_MIN=$(RL_LIMIT_PER_MIN ) \
2499+ RL_PROMPT_ID=$(RL_PROMPT_ID ) \
2500+ locust -f $(MCP_RATE_LIMITER_REDIS_CAPACITY_LOCUSTFILE ) \
2501+ --host=$(MCP_BENCHMARK_HOST ) \
2502+ --users=$(RL_USERS ) \
2503+ --spawn-rate=$(RL_SPAWN_RATE ) \
2504+ --run-time=$(RL_RUN_TIME ) \
2505+ --headless \
2506+ --only-summary \
2507+ CapacityPromptUser || true'
2508+
24782509.PHONY : benchmark-mcp-mixed-300
24792510benchmark-mcp-mixed-300 : # # Distributed 300-user mixed MCP benchmark
24802511 @echo " 📊 Running distributed mixed MCP benchmark..."
0 commit comments