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.1.tar.gz (7.5 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.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: atlaslb-1.0.1.tar.gz
  • Upload date:
  • Size: 7.5 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.1.tar.gz
Algorithm Hash digest
SHA256 a35d750a3efce5530ee7093e3126a340f5501531a222ea3317b1b30caf919e55
MD5 68772bcbac3157fc345fa53d024e0b5a
BLAKE2b-256 897571224531495de94538c23c0a6d796a0c954c6fcc3504edcaaf81fbb66bd2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: atlaslb-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f979f98fcab66350eee87cd9c221baaea1c9616456a7736ab10cdfd601858c3
MD5 9e298bb8af17403c834767a4854e5221
BLAKE2b-256 aa249e07ef62c5086fd134669a1468cb54b158ad1b213cff4039fd3463b624e7

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