{ "info": { "author": "Praekelt Foundation", "author_email": "dev@praekelt.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django Scaler\n=============\n**Degrade gracefully by automatically replacing heavy pages with static pages while a server is taking strain.**\n\n.. contents:: Contents\n :depth: 5\n\nInstallation\n------------\n\n#. Install or add ``django-scaler`` to your Python path.\n\n#. Add ``scaler`` to your ``INSTALLED_APPS`` setting.\n\n#. Add ``scaler.middleware.ScalerMiddleware`` to the top of your ``MIDDLEWARE_CLASSES`` setting.\n\n#. Add (r'^scaler/', include('scaler.urls')) to urlpatterns.\n\nOverview\n--------\n\nServers may at times get overloaded due to a variety of reasons. When that\nhappens you don't want expensive requests to bring down your entire site. The\nsite must redirect expensive requests to a \"server busy\" page while the server\nis under load, and then automatically remove the redirects once the load has\ndropped enough. \n\n`django-scaler` addresses this situation in two ways. Firstly, it knows which\nrequests to redirect by itself. Secondly, it can be instructed to redirect the\nN most expensive requests. It stores response time data in in-memory caches\nenabling it to make these decisions.\n\nUsage\n-----\n\nPasted from ``test_settings.py``::\n\n DJANGO_SCALER = { \n 'server_busy_url_name': 'server-busy',\n\n # How many response times to consider for an URL. A small value means slow\n # response times are quickly acted upon, but it may be overly aggressive. \n # A large value means an URL must be slow for a number of requests before \n # it is acted upon. The default is 100.\n 'trend_size': 10,\n\n # How much slower than average the trend must be before redirection kicks\n # in. The default is 4.0.\n 'slow_threshold': 2.0,\n\n # How many seconds to keep redirecting an URL before serving normally. The\n # default is 60.\n 'redirect_for': 10,\n\n # A function that returns how many of the slowest URLs must be redirected.\n # Depending on the site, data and load on the server this may be a large\n # number. This allows external processes to instruct the middleware to\n # redirect. The default is 0.\n 'redirect_n_slowest_function': lambda: 0,\n\n # A function that returns what percentage of the slowest URLs must be\n # redirected. Depending on the site, data and load on the server this may\n # approach 100. The default is 0.\n 'redirect_percentage_slowest_function': lambda: 0,\n\n # A function that returns a list of regexes. URLs matching the regexes are\n # redirected. Each regex is a simple string. Do not prefix with r''. The\n # default is an empty list.\n 'redirect_regexes_function': lambda: [],\n }\n\nAuthors\n=======\n\nPraekelt Foundation\n-------------------\n* Hedley Roos\n\nChangelog\n=========\n\n0.2\n---\n#. Regex URL matching for explicit redirection.\n#. Percentage slowest explicit redirection.\n\n0.1\n---\n#. First release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/praekelt/django-scaler", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-scaler", "package_url": "https://pypi.org/project/django-scaler/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-scaler/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/praekelt/django-scaler" }, "release_url": "https://pypi.org/project/django-scaler/0.2/", "requires_dist": null, "requires_python": null, "summary": "Degrade gracefully by automatically replacing heavy pages with static pages while a server is taking strain.", "version": "0.2" }, "last_serial": 790543, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "8e06b5679d454dd8998284d2628af63c", "sha256": "fcd8f934ebf88b00385fb00d4c19721e06a6acf7ab00f1601625f3e6484ee1c9" }, "downloads": -1, "filename": "django_scaler-0.2-py2.6.egg", "has_sig": false, "md5_digest": "8e06b5679d454dd8998284d2628af63c", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 13553, "upload_time": "2012-05-31T12:38:05", "url": "https://files.pythonhosted.org/packages/08/39/a902c7cb23603aba1460ab26ed02490a906b7b5d7659c6aa0aa0e8e85db9/django_scaler-0.2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "0f75aa3106c38d115c080e1046671988", "sha256": "ad7c527d5d7ba33f0256a657127b1933844ebcca90508cd08ddbf97c87cd0359" }, "downloads": -1, "filename": "django_scaler-0.2-py2.7.egg", "has_sig": false, "md5_digest": "0f75aa3106c38d115c080e1046671988", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 13528, "upload_time": "2012-05-31T12:38:21", "url": "https://files.pythonhosted.org/packages/46/92/fae243968074c928465ea7fe72d7eecedcc19421014badfc784deb0bcd60/django_scaler-0.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4b68724531100a71f59d5b2b6c964eb6", "sha256": "d4069d04176e948ffcf81267e061f2927d51dd5a0505d2e02d10b614531816d0" }, "downloads": -1, "filename": "django-scaler-0.2.tar.gz", "has_sig": false, "md5_digest": "4b68724531100a71f59d5b2b6c964eb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8694, "upload_time": "2012-05-31T12:38:04", "url": "https://files.pythonhosted.org/packages/c1/76/0a1b2841ac5f5e7a252d93dca761e21c54199e5b84c27547cd54d93e3830/django-scaler-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e06b5679d454dd8998284d2628af63c", "sha256": "fcd8f934ebf88b00385fb00d4c19721e06a6acf7ab00f1601625f3e6484ee1c9" }, "downloads": -1, "filename": "django_scaler-0.2-py2.6.egg", "has_sig": false, "md5_digest": "8e06b5679d454dd8998284d2628af63c", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 13553, "upload_time": "2012-05-31T12:38:05", "url": "https://files.pythonhosted.org/packages/08/39/a902c7cb23603aba1460ab26ed02490a906b7b5d7659c6aa0aa0e8e85db9/django_scaler-0.2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "0f75aa3106c38d115c080e1046671988", "sha256": "ad7c527d5d7ba33f0256a657127b1933844ebcca90508cd08ddbf97c87cd0359" }, "downloads": -1, "filename": "django_scaler-0.2-py2.7.egg", "has_sig": false, "md5_digest": "0f75aa3106c38d115c080e1046671988", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 13528, "upload_time": "2012-05-31T12:38:21", "url": "https://files.pythonhosted.org/packages/46/92/fae243968074c928465ea7fe72d7eecedcc19421014badfc784deb0bcd60/django_scaler-0.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4b68724531100a71f59d5b2b6c964eb6", "sha256": "d4069d04176e948ffcf81267e061f2927d51dd5a0505d2e02d10b614531816d0" }, "downloads": -1, "filename": "django-scaler-0.2.tar.gz", "has_sig": false, "md5_digest": "4b68724531100a71f59d5b2b6c964eb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8694, "upload_time": "2012-05-31T12:38:04", "url": "https://files.pythonhosted.org/packages/c1/76/0a1b2841ac5f5e7a252d93dca761e21c54199e5b84c27547cd54d93e3830/django-scaler-0.2.tar.gz" } ] }