atlas

This project is maintained by Pranshu258

Atlas

Atlas is a reverse proxy based load balancing framework implemented in Python. It exposes various load balancing algorithms to distribute incoming requests across multiple origin servers. The load balancer state is maintained in-memory at the reverse proxy server, with no (or minimal) set up needed on the origin server.

Installation

Atlas can be installed from the Python Package Index using the following command:

pip install atlaslb

Usage

Supported Algorithms

  1. Random
  2. Round Robin
  3. Least Connection
  4. Least Latency

OriginServer

The OriginServer class represents an origin server with various attributes such as host, weight, CPU usage, local requests in flight (local_rif), and latency.

Methods

BaseLoadBalancer

The BaseLoadBalancer class is the base class for all load balancers. It maintains a list of origin servers and a mapping of hostnames to server objects.

Methods

LoadBalancerFactory

The LoadBalancerFactory class is a factory class to create different types of load balancers based on the given configuration.

Methods