Name | atlaslb JSON |
Version |
1.0.4
JSON |
| download |
home_page | None |
Summary | Atlas - A reverse proxy software load balancer for Django apps. |
upload_time | 2024-12-19 10:31:46 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 Pranshu Gupta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
load balancer
slb
reverse proxy
django
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
1. [Random](./random.md)
2. [Round Robin](./roundrobin.md)
3. [Least Connection](./leastconnection.md)
4. [Least Latency](./leastlatency.md)
## 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "atlaslb",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "load balancer, slb, reverse proxy, django",
"author": null,
"author_email": "Pranshu Gupta <pranshug258@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/04/c9/f6648aea202642e785844dc3d112d3b471c57360f53e68f159eef6f904cf/atlaslb-1.0.4.tar.gz",
"platform": null,
"description": "# Atlas\nAtlas 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.\n\n## Installation\nAtlas can be installed from the Python Package Index using the following command: \n```\npip install atlaslb\n```\n\n## Usage\n\n\n## Supported Algorithms\n1. [Random](./random.md)\n2. [Round Robin](./roundrobin.md)\n3. [Least Connection](./leastconnection.md)\n4. [Least Latency](./leastlatency.md)\n\n## OriginServer\nThe `OriginServer` class represents an origin server with various attributes such as host, weight, CPU usage, local requests in flight (local_rif), and latency.\n\n#### Methods\n- `__init__(self, host, weight=1, cpu=0, local_rif=0, latency=0)`: Initializes the origin server with the given attributes.\n- `__str__(self)`: Returns a string representation of the origin server.\n\n### BaseLoadBalancer\nThe `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.\n\n#### Methods\n- `__init__(self, servers: dict[str, OriginServer] = None)`: Initializes the load balancer with the given servers.\n- `add_server(self, server: OriginServer)`: Adds a server to the load balancer.\n- `forward_request(self, request, path: str)`: Forwards the request to the appropriate origin server based on the load balancing algorithm.\n- `__str__(self)`: Returns a string representation of the load balancer.\n\n## LoadBalancerFactory\nThe `LoadBalancerFactory` class is a factory class to create different types of load balancers based on the given configuration.\n\n#### Methods\n- `CreateLoadBalancer(self, configuration)`: Creates a load balancer based on the provided configuration.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Pranshu Gupta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Atlas - A reverse proxy software load balancer for Django apps.",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://pranshug.com/atlas/"
},
"split_keywords": [
"load balancer",
" slb",
" reverse proxy",
" django"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bb48e4c1a30b37dff83d9dbf03e5784fbd49bfe94156ca92f839e9f10fdcf349",
"md5": "88dbd7afcd8eb407e129d327370f024d",
"sha256": "172c9186514a6add0ed83b63afd241587c8443164eba6cfdd3941e493865923f"
},
"downloads": -1,
"filename": "atlaslb-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "88dbd7afcd8eb407e129d327370f024d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 11382,
"upload_time": "2024-12-19T10:31:43",
"upload_time_iso_8601": "2024-12-19T10:31:43.517086Z",
"url": "https://files.pythonhosted.org/packages/bb/48/e4c1a30b37dff83d9dbf03e5784fbd49bfe94156ca92f839e9f10fdcf349/atlaslb-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "04c9f6648aea202642e785844dc3d112d3b471c57360f53e68f159eef6f904cf",
"md5": "181968f23678ee73e5dbc0a7a56b8004",
"sha256": "0160b486590bccb8dd8164ddebfb410e79d541998b557bd7255383acdd665d33"
},
"downloads": -1,
"filename": "atlaslb-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "181968f23678ee73e5dbc0a7a56b8004",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 7705,
"upload_time": "2024-12-19T10:31:46",
"upload_time_iso_8601": "2024-12-19T10:31:46.378989Z",
"url": "https://files.pythonhosted.org/packages/04/c9/f6648aea202642e785844dc3d112d3b471c57360f53e68f159eef6f904cf/atlaslb-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-19 10:31:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "atlaslb"
}