docs: add comprehensive rate limiting audit#1468
docs: add comprehensive rate limiting audit#1468kilo-code-bot[bot] wants to merge 1 commit intomainfrom
Conversation
|
|
||
| ## Architectural Notes | ||
|
|
||
| - **No Redis:** All rate limiting uses PostgreSQL or Cloudflare's native rate limiting. No Redis-based stores. |
There was a problem hiding this comment.
WARNING: This note excludes mechanisms documented earlier in the audit
The webhook limiter is backed by Durable Object SQLite and the abuse-detection flow uses an external service, so saying all rate limiting uses PostgreSQL or Cloudflare's native rate limiting is broader than what the rest of this document shows.
| - **No Redis:** All rate limiting uses PostgreSQL or Cloudflare's native rate limiting. No Redis-based stores. | |
| - **No Redis:** None of the mechanisms in this audit use Redis; they rely on PostgreSQL, Cloudflare-managed infrastructure (including Durable Object SQLite and RateLimit bindings), or the external abuse service. |
| ## Architectural Notes | ||
|
|
||
| - **No Redis:** All rate limiting uses PostgreSQL or Cloudflare's native rate limiting. No Redis-based stores. | ||
| - **No environment-variable-controlled thresholds:** All rate limit values are hardcoded constants. Changing limits requires a code deployment. |
There was a problem hiding this comment.
WARNING: This overstates how the thresholds are configured
The deploy-dispatcher limit comes from wrangler.jsonc, and the abuse-detection service is env-var / external-service driven, so not every limit value here is a hardcoded constant in app code.
| - **No environment-variable-controlled thresholds:** All rate limit values are hardcoded constants. Changing limits requires a code deployment. | |
| - **Configuration:** Most explicit limits are defined in code or Wrangler config, while abuse-detection thresholds come from external-service or environment configuration. |
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Other Observations (not in diff)None. Files Reviewed (1 files)
Reviewed by gpt-5.4-20260305 · 842,625 tokens |
Summary
docs/rate-limiting-audit.md) cataloging all rate limiting, throttling, and IP-based limits across the gateway codebase.Verification
rateLimit,rate_limit,429,Too Many Requests,quota,throttle,MAX_REQUESTS,per.minute,per.hour, etc.)Visual Changes
N/A
Reviewer Notes
src/app/api/openrouter/[...path]/route.ts:257to change this once the extension supports it.src/app/admin/free-model-usage/page.tsx:49mentions "600 requests/day" which is stale — the actual limit is 10,000/24h.src/lib/abuse-service.ts:304).