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
Usage
Supported Algorithms
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atlaslb-1.0.4.tar.gz.
File metadata
- Download URL: atlaslb-1.0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0160b486590bccb8dd8164ddebfb410e79d541998b557bd7255383acdd665d33
|
|
| MD5 |
181968f23678ee73e5dbc0a7a56b8004
|
|
| BLAKE2b-256 |
04c9f6648aea202642e785844dc3d112d3b471c57360f53e68f159eef6f904cf
|
File details
Details for the file atlaslb-1.0.4-py3-none-any.whl.
File metadata
- Download URL: atlaslb-1.0.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
172c9186514a6add0ed83b63afd241587c8443164eba6cfdd3941e493865923f
|
|
| MD5 |
88dbd7afcd8eb407e129d327370f024d
|
|
| BLAKE2b-256 |
bb48e4c1a30b37dff83d9dbf03e5784fbd49bfe94156ca92f839e9f10fdcf349
|