Skip to main content

Atlas - A reverse proxy software load balancer for Django apps.

Reason this release was yanked:

unstable

Project description

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

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

  • __init__(self, host, weight=1, cpu=0, local_rif=0, latency=0): Initializes the origin server with the given attributes.
  • __str__(self): Returns a string representation of the origin server.

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

  • __init__(self, servers: dict[str, OriginServer] = None): Initializes the load balancer with the given servers.
  • add_server(self, server: OriginServer): Adds a server to the load balancer.
  • forward_request(self, request, path: str): Forwards the request to the appropriate origin server based on the load balancing algorithm.
  • __str__(self): Returns a string representation of the load balancer.

LoadBalancerFactory

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

Methods

  • CreateLoadBalancer(self, configuration): Creates a load balancer based on the provided configuration.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atlaslb-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

atlaslb-1.0.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file atlaslb-1.0.0.tar.gz.

File metadata

  • Download URL: atlaslb-1.0.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for atlaslb-1.0.0.tar.gz
Algorithm Hash digest
SHA256 081fd5e367df617ab88a07e0276d00f061e247f542621b9e65f593295101ba73
MD5 6f10fac3c4123b20084c995fb91e9a70
BLAKE2b-256 066e55c30f1f6352dca12207314b3b3235faf3ada89242a2a1fa3e81b1bf6a08

See more details on using hashes here.

File details

Details for the file atlaslb-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: atlaslb-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for atlaslb-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c067837fd826f3d4e38f369ee1f49bed4888433c5e71daa51231c12eb711c8c
MD5 f61bfc82e8538b618647a5b33cb93b06
BLAKE2b-256 03b3074e42679ccd95874d4516d144214309156bbad25171ebce92975383e11e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page