Skip to main content

add-api-rate-limiting

Add API rate limits that protect constrained outcomes while preserving legitimate bursts and recovery. Use when traffic can exhaust capacity, amplify abuse, or unfairly consume a shared service.

ソース情報

リポジトリ
protosphinx/sphinxstack
ソースの最終更新活動
2026年7月29日 13:55
検出された SKILL.md の言語
英語
スター
2
フォーク
0

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

ファイルエクスプローラー
2 ファイル

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
add-api-rate-limiting
category
code
description
Add API rate limits that protect constrained outcomes while preserving legitimate bursts and recovery. Use when traffic can exhaust capacity, amplify abuse, or unfairly consume a shared service.
# add-api-rate-limiting Limit the scarce operation at the narrowest trustworthy identity and scope. ## Procedure 1. Define the protected resource, abuse case, acceptable burst, sustained rate, and recovery objective. 2. Select trustworthy dimensions such as account, tenant, credential, operation, destination, and network signal. 3. Choose a token bucket, fixed window, sliding window, or concurrency limit from the actual traffic behavior. 4. Store counters atomically across serving instances and define clock and regional consistency assumptions. 5. Return a stable `429` response with safe retry guidance and useful quota headers. 6. Separate authentication, expensive-operation, global safety, and contractual quota layers. 7. Define narrowly owned exemptions, degraded behavior, and fail-open or fail-closed choices. 8. Instrument allowed, limited, delayed, rejected, and exempted requests by policy version. 9. Load-test bursts, sustained use, distributed concurrency, counter outage, and legitimate shared networks. 10. Review false positives and capacity after launch and adjust with evidence. ## Guardrails - Do not identify a person solely by IP address. - Avoid an unbounded external counter lookup on the protected request path. - Never promise an exact quota when the chosen distributed algorithm is intentionally approximate. ## Done - A versioned limit policy records scope, algorithm, thresholds, and failure mode - Load and failure tests verify protection and recovery behavior - Limit decisions reconcile with traffic, capacity, and false-positive metrics
GitHubで見る