loom-rate-limiting
Installation
SKILL.md
Rate Limiting
Overview
Rate limiting is a technique to control the rate of requests a client can make to an API. It protects services from abuse, ensures fair usage, and maintains system stability. This skill covers algorithms, implementation patterns, and best practices for distributed rate limiting.
Key Concepts
Rate Limiting Algorithms
Token Bucket Algorithm:
The token bucket allows bursts while maintaining an average rate.
class TokenBucket {
private tokens: number;
private lastRefill: number;