Skip to main content

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

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.3.tar.gz (7.7 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.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: atlaslb-1.0.3.tar.gz
  • Upload date:
  • Size: 7.7 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.3.tar.gz
Algorithm Hash digest
SHA256 75cc86cbb114cb0f27700dd217a9af829ce0c652916d6fe41191e07e8cc74521
MD5 953d23d24c2ee51e27e7e560ea36df34
BLAKE2b-256 9d9154eaf7431d080a1e3f46d68edd41f8dd10ad9342b99526c787edc8e195b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: atlaslb-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 98c91d6b139a2b067111965fc4f758dfae063241835f05f0d1357b30731af470
MD5 5bcabcf6287dae4fc49928c2a263899d
BLAKE2b-256 fbe0d1a448817d9191491aec4e712d0149f637e6aef9efcca51058fda733a593

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