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.2.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.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: atlaslb-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 98da65c78de9c25e31ab9497a89403a49300fc4864fe2e1f2e64d5626d16b88d
MD5 7f13c06229942d44929dc4d9c63f905e
BLAKE2b-256 72799d4e4dc4ba83d23983998ef066b9fcdd54a78dc4c58e1a2117aa574d6cc2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: atlaslb-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d33f3eb632fd72231fe1db0651a0cf85a26aa0b11889823b21106a083dd61171
MD5 ac77427b14ff26287d3b8af3c278c888
BLAKE2b-256 0573435ae086611c68de31415aee1ee53d13025f3a8c993fbb57d2e57dcc5b48

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