Skip to main content

What is edgeProxy?

edgeProxy is a high-performance distributed TCP proxy written in Rust, designed to operate at edge Points of Presence (POPs) worldwide. It routes client connections to optimal backends based on geographic proximity, backend health, current load, and capacity limits.

Key Features

  • Geo-Aware Routing: Routes clients to the nearest regional backend using MaxMind GeoIP
  • Client Affinity: Sticky sessions with configurable TTL ensure consistent backend assignment
  • Weighted Load Balancing: Intelligent scoring based on region, load, and backend weight
  • Soft/Hard Limits: Graceful degradation with connection limits per backend
  • Dynamic Configuration: Hot-reload routing database without restart
  • Zero-Copy Proxying: Efficient bidirectional TCP copy with Tokio
  • WireGuard Ready: Designed for overlay network connectivity between POPs

Use Cases

ScenarioDescription
CDN/Edge ComputingGlobal POPs serving content from nearest origin
Gaming ServersSession affinity for stateful game connections
Multi-Region APIsAutomatic failover and geo-routing
Database ProxiesRead replica routing based on client location

Architecture Overview

Architecture Overview

Quick Start

# Clone the repository
git clone https://github.com/andrebassi/edgeproxy.git
cd edgeproxy

# Build and run
task build
task run

# Or with Docker
task docker-build
task docker-up
task docker-test

Technology Stack

ComponentTechnology
LanguageRust 2021 Edition
Async RuntimeTokio (full features)
DatabaseSQLite (rusqlite)
ConcurrencyDashMap (lock-free)
GeoIPMaxMind GeoLite2
NetworkingWireGuard overlay

Next Steps