TakeGate
Production-Ready Load Balancer & API Gateway
A fast load balancer and API gateway written in Python with async/await. It supports TCP, UDP, HTTP, HTTPS, HTTP/2, and HTTP/3. You get smart routing, smart caching, auto health checks, and full monitoring.
Load Balancing
High-Performance & Async Python
Core Features
Load balancing built for real use. Unlike most cloud services, the code is open source.
Multi-Protocol Support
TCP, UDP, HTTP, HTTPS, HTTP/2, HTTP/3 protocols. HTTP/3 uses QUIC. It cuts delay and keeps connections alive when networks change.
Advanced Routing Engine
Path-based, host-based, header-based, and query parameter routing. OpenAPI 3.0+ specification import for automatic microservices route generation.
Blake2 Caching System
Many storage options (memory, Redis, disk, hybrid). You set how long items last. It handles header differences. It falls back by tier on its own.
Protocol-Specific Health Checks
Checks TCP connections, HTTP and HTTPS status codes, and UDP packets. You set how often it checks and how it retries.
High-Performance Async
1,422 requests/second sustained. Mean latency 28.37ms, P95 48.34ms, P99 56.05ms. 70-90% scaling efficiency when you add servers.
Management & Observability
Web dashboard, REST API, CLI tools, Prometheus metrics export, Grafana support, live traffic stats, and sticky sessions.
Advanced Capabilities
Strong load balancing for real traffic. Unlike most cloud services, the code is open source.
Application Load Balancing
- ✓Layer 7 (Application) load balancing
- ✓Path-based, host-based, header-based routing
- ✓Query parameter-based routing rules
- ✓WebSocket support with long-lived connections
- ✓HTTP method filters and timeouts
- ✓Request/response modification capabilities
Network Load Balancing
- ✓Layer 4 (Transport) load balancing
- ✓Ultra-high performance: 1,422 requests/second
- ✓Mean latency: 28.37ms, P95: 48.34ms, P99: 56.05ms
- ✓TCP and UDP protocol support
- ✓Connection pooling and multiplexing
- ✓Round Robin, Least Connections, Weighted algorithms
Advanced Routing
- ✓OpenAPI 3.0+ specification import
- ✓Automatic route generation from API docs
- ✓Host-based routing for multi-tenant apps
- ✓Regex-based custom routing rules
- ✓Route-level controls and customization
- ✓Microservices architecture support
Caching & Performance
- ✓Blake2 caching with multiple backends (memory, Redis, disk)
- ✓TTL management and header variance handling
- ✓Compression (gzip, brotli, deflate)
- ✓Keep-alive connection management
- ✓Connection pooling optimization
- ✓Automatic tier-based fallback mechanisms
SSL/TLS & Security
- ✓SSL termination (edge, bridge, passthrough modes)
- ✓Certificate management and renewal
- ✓Per-route and global rate limiting
- ✓Configurable burst thresholds
- ✓DDoS protection capabilities
- ✓Edit headers and set security rules
Monitoring & Management
- ✓Real-time metrics and Prometheus export
- ✓Modern web dashboard at port 8000
- ✓See traffic stats and speed
- ✓REST API to manage it with code
- ✓Health status monitoring with custom checks
- ✓Grafana dashboard integration support
Open Source & Production Ready
PyLoadBalancer is a fully open-source load balancer built with Python's async/await architecture, designed for production deployments. It gives you the freedom of open source with enterprise-grade performance, similar to AWS load balancing services.
Get Started with TakeGate
Use TakeGate to run your API gateway and load balancer. Install it with pipx, pip, or a ready-made executable. It has a web dashboard, a REST API, and CLI tools.
Installation Options: Package installation (pipx/pip), Frozen Linux executables (~74MB), Docker integration daemon (~66MB), or Systemd service integration with automatic post-install setup.
Read the README and docs on our GitLab.
