Skip to content

jairoblatt/uxlb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uxlb

uxlb is a high-performance load balancer written in Rust, designed for low-latency HTTP proxying over Unix sockets. It supports both synchronous (std) and asynchronous (tokio) operation modes.

Features

  • Round-Robin Load Balancing: Distributes incoming HTTP requests across multiple backend services via Unix sockets.
  • Fire-and-Forget (FAF) Routing: Allows specific HTTP routes (method + path) to be handled asynchronously. The load balancer immediately returns a configurable status code to the client and forwards the request to the backend in the background.
  • Keep-Alive Support: Maintains persistent client connections for efficiency.
  • Configurable Worker Pool: Number of background workers can be set via environment variable.
  • Resource-Efficient Buffer Pooling: (Async version) Uses buffer pools to minimize allocations.
  • Connection Limits: (Async version) Enforces a maximum number of concurrent connections.

Usage

docker build --no-cache -t uxlb .

SOCKET_PATH=/tmp/api1.sock node api.js
SOCKET_PATH=/tmp/api2.sock node api.js

LB_UPSTREAMS=/tmp/api1.sock,/tmp/api2.sock LB_FAF=POST:/payments:200 cargo run --release
LB_UPSTREAMS=/tmp/api1.sock,/tmp/api2.sock cargo run --release

About

High-performance load balancer written in Rust, designed for low-latency HTTP proxying over Unix sockets.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors