A blazing-fast, production-grade Reverse Proxy built with Golang, featuring dynamic route configuration, rate limiting, hot-reloadable YAML-based routing, and performance benchmarking up to 2 million requests per minute.
A Reverse Proxy is a server that sits between the client and one or more backend servers, forwarding client requests to those backend services and returning their responses. It is used for:
- Load balancing
- Caching
- SSL termination
- Web acceleration
- Rate limiting and security
Unlike a forward proxy (which sits in front of the client), a reverse proxy operates on behalf of the server.
TurboGate is designed to be a plug-and-play, scalable reverse proxy solution that supports:
- Dynamic route additions at runtime
- YAML-based routing configuration
- IP-based token bucket rate limiting
- Prometheus-compatible metrics
- High concurrency with Go's net/http and goroutines
This project was created to demonstrate not just how reverse proxies work under the hood, but also how to build a production-ready reverse proxy from scratch, while emphasizing performance and extensibility.
- β Dynamic Routing: Add/remove proxy routes in real-time via hot-reloadable YAML.
- β Token Bucket Rate Limiting: Per-IP request throttling to prevent abuse.
- β
Prometheus Metrics: Integrated monitoring with
/metrics
endpoint. - β High Throughput: Benchmarked at up to 2 million requests/min.
- β Fully Dockerized: Easy deployment and local testing.
- β Simple Frontend: Enter a domain and get a working proxy route.
- β API for Route Management: Seamlessly integrate dynamic route control.
TurboGate.WallThrough.mp4
4.1.mp4
Achieved almost 2,000,000 requests per minute during JMeter benchmarking on a multi-core instance
- Language: Go (Golang)
- Concurrency: Native goroutines & channels
- Routing Configuration: YAML
- Rate Limiting: Token bucket algorithm
- Metrics: Prometheus-compatible
- Deployment: Docker & Render
- Frontend: React + Tailwind (Vercel hosted)
Due to modern web security protocols like CORS (Cross-Origin Resource Sharing) and X-Frame-Options, not all websites allow themselves to be reverse proxied, especially through browsers. This is a deliberate protection mechanism against:
- Clickjacking
- Cross-site forgery
- Content manipulation
So, even if TurboGate fetches the content server-side, some websites may still block rendering in the client browser.
Follow these steps to get the project running locally:
# 1. Clone the repo
git clone https://github.com/yourusername/turbogate.git
cd turbogate
# 2. Build and run
go run cmd/main.go
Alternatively, using docker:
# Docker Build & Run
docker build -t turbogate .
docker run -p 8080:8080 turbogate
Frontend setup:
# 1. Navigate to frontend directory
cd frontend
# 2. Install dependencies
npm install
# 3. Run development server
npm run dev
π§ͺ API Usage β Add New Route (POST)
POST /api/add-route
Content-Type: application/json
{
"path": "/youtube",
"target": "https://youtube.com"
}
π YAML Configuration Format
routes:
- path: /github
target: https://github.com
- path: /openai
target: https://openai.com
These URLs typically allow reverse proxying:
https://jsonplaceholder.typicode.com
β TLS termination with custom domain support
β Basic Auth or API keys for route creation
β Caching layer (Redis or in-memory)
β WebSocket support
β Admin dashboard with metrics visualizations
β PostgreSQL or Redis-based persistent route store
β Vercel button for one-click deploy
This project is licensed under the MIT License. Feel free to use, modify, or extend it with proper attribution.
Inspired by tools like NGINX, Traefik, and Caddy
Special thanks to the Go community
Load testing powered by Apache JMeter