https://github.com/neilblaze/api-ratelimiter
RateLimits API Requests with 15s Timeout on every RPC
https://github.com/neilblaze/api-ratelimiter
Last synced: 29 days ago
JSON representation
RateLimits API Requests with 15s Timeout on every RPC
- Host: GitHub
- URL: https://github.com/neilblaze/api-ratelimiter
- Owner: Neilblaze
- Created: 2022-01-26T17:20:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-26T18:48:45.000Z (over 4 years ago)
- Last Synced: 2025-02-24T13:15:07.635Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://grpc-ratelimit-api.vercel.app/api/user
- Size: 66.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## RateLimits API Requests with 15s Timeout on every RPC
Utilizes `lru-cache` to implement rate limits for API routes on every RPC via ([Serverless Functions](https://vercel.com/docs/serverless-functions/introduction)).
```powershell
curl http://localhost:3000/api/user -I
HTTP/1.1 200 OK
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 9
curl http://localhost:3000/api/user -I
HTTP/1.1 429 Rate limit exceeded! 💀
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 0
```
**Limit Ceiling : 500** | Client : [Test Here](https://grpc-ratelimit-api.vercel.app)