A smart reverse proxy with built-in rate limiting — soon to be AI-powered.
ThrottlePoint is a lightweight reverse proxy server written in Go, designed to:
- Intercept and forward HTTP requests
- Apply configurable rate limiting (currently using the Token Bucket algorithm)
- Be easily extendable for real-time AI-based intent analysis and dynamic rate limiting
Think of it as your traffic cop at the API junction — smart, fast, and soon, intuitive.
- Forwards any incoming request (
/*) to a backend server. - Preserves method, headers, and query params.
- Pipes the response back to the client.
- Rate limit per IP address.
- Configurable token rate and capacity.
- Efficient and thread-safe (uses
sync.Mapand per-bucket mutex). - Background cleanup of inactive buckets.
- Uses environment variable
BACKEND_URLto forward requests (default:http://localhost:3000). - Easy to adapt for different backends.
- Analyze request metadata (IP, headers, payload).
- Predict request “intent” or risk level using lightweight ML models.
- Smart categorization (e.g., normal traffic vs. scrapers vs. potential abuse).
- Adapt limits in real-time based on intent scores.
- Trusted users = more leniency.
- Suspicious traffic = throttled or blocked.
- Log request outcomes.
- Fine-tune AI model/rules continuously for improved predictions.
- Enable reinforcement-style learning.
- Web dashboard to view request logs, AI decisions, and live traffic stats.
- Manual overrides and real-time debugging.
# clone the repo
git clone https://github.com/asutosh2203/throttle-point.git
cd throttle-point
# create .env file
echo "BACKEND_URL=<YOUR BACKEND URL>" > .env
# run the app
go run main.go.
├── main.go # Entry point
├── handlers/
│ └── proxy.go # Request forwarding logic
├── middleware/
│ └── rateLimiter.go # Rate limiting middleware
│ └── token_bucket.go # Token Bucket middleware
├── go.mod
├── .env # Backend target URL
├── .gitignore
└── README.md
AI brains welcome. If you’ve got ideas on risk scoring, model integration, or smarter rate control — hop in!
Born from frustration with blunt rate-limiters and a love for AI-enhanced infrastructure.
Maintained by Asutosh
Drop a ⭐ if you like where this is going!