{ "info": { "author": "Duncan McGreggor, Anthony Baxter", "author_email": "oubiwann@divmod.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: No Input/Output (Daemon)", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Internet", "Topic :: System :: Networking" ], "description": "~~~~~~~~~~~~~~\r\ntxLoadBalancer\r\n~~~~~~~~~~~~~~\r\n\r\n.. contents::\r\n :depth: 1\r\n\r\n============\r\nIntroduction\r\n============\r\n\r\nThis is a pure python TCP load balancer. It takes inbound TCP connections and\r\nconnects them to one of a number of backend servers.\r\n\r\ntxLoadBalancer is a fork of Anthony Baxter's PythonDirector. It removed all\r\nthreading and asyncore code and the admin UI with the Twisted-based analogs. It\r\nalso significantly reorganized the API and provided many new features (see\r\nbelow).\r\n\r\n\r\n=====\r\nUsage\r\n=====\r\n\r\n $ twistd -noy ./bin/txlb.tac\r\n\r\nThis will use the default configuration file in ./etc/config.xml; you can edit\r\nthe .tac file to point to the config you prefer. Be sure to edit the\r\nconfig.xml file to properly reflect your services in need of load-balancing.\r\n\r\nTo enable the admin interface, your config file must have the admin section\r\ndefined, with the required fields. For an example, be sure to see\r\n./etc/config.xml. For more details, please see the configuration information in\r\nthe ./doc directory.\r\n\r\nIf you are creating your own script and don't want to use txlb.tac, you can\r\nimport the application setup functions in txlb.application.\r\n\r\nIf you want to \"embed\" a load-balancer in your Twisted application, see the\r\nexample ./bin/txlbWeb.tac.\r\n\r\n\r\n========\r\nFeatures\r\n========\r\n\r\n* It is a pure-Twisted TCP loadbalancer.\r\n\r\n* Thanks to Twisted, it's async i/o based, so much less overhead than\r\n fork/thread based balancers.\r\n\r\n* It has multiple scheduling algorithms (random, round robin, leastconns,\r\n weighted). If a server fails to answer, it's removed from the pool - the\r\n client that failed to connect gets transparently failed over to a new host.\r\n\r\n* Provides an optional builtin webserver for a built-in admin UI.\r\n\r\n* Seperate management timer services that perform such tasks as periodically\r\n readding failed hosts to the rotation, updated on-disk config files with\r\n changes made to the running server.\r\n\r\n* A built-in SSH server for managing (and modifying) a running load-balancer\r\n instance.\r\n\r\n* A Twisted API for adding a load-balancing service to your Twisted application\r\n without the need to run a separate load-balancer.\r\n\r\n* The application uses an XML-based configuration file.\r\n\r\n\r\n===========\r\nPerformance\r\n===========\r\n\r\n(This section is currently incomplete)\r\n\r\nDuncan's notes from 2008, tested on a 2 CPU Sun Netra 240:\r\n\r\n* a single apache instance on Solaris 10\r\n * starting threads:\r\n * max threads\r\n\r\n* 2 load-balanced apache instances on Solaris 10\r\n\r\n* twisted.web instances on Solaris 10 (same docroot)\r\n\r\n* 2 load-balanced twisted.web instances\r\n\r\n* PythonDirector 1.0.0 proxies for 2 load-balanced twisted.web instances\r\n\r\nAnthony's original notes on performance:\r\n\r\n* On my notebook, load balancing an apache on the same local ethernet\r\n (serving a static 18K text file) gets 155 connections per second and\r\n 2850 kbytes/s throughput (apachebench -n 2000 -c 10). Connecting directly\r\n to the apache gets 180 conns/sec and 3400kbytes/s. So unless you're\r\n serving really really stupidly high hit rates it's unlikely to be\r\n pythondirector causing you difficulties. (Note that 155 connections/sec\r\n is 13 million hits per day...)\r\n\r\n* Running purely over the loopback interface to a local apache seems to\r\n max out at around 350 conns/second.\r\n\r\n\r\n=======\r\nChanges\r\n=======\r\n\r\nFrom txLoadBalancer 1.0.1 to 1.1.0\r\n----------------------------------\r\n\r\n* Massive API changes: competely reorganzied the code base.\r\n* Integrated patches from Apple's Calendar Server project.\r\n* A new API for creating load-balanced services within a Twisted application\r\n (without the need to run a separate load-balancingn daemon).\r\n* Added support for live interaction with load-balancer via SSH connection to\r\n running Python interpretter (Twisted manhole).\r\n* The ability to start listening on a new port without restaring the\r\n application.\r\n* Added a weighted load balance scheduler.\r\n\r\nFrom txLoadBalancer 0.9.1 to 1.0.1\r\n----------------------------------\r\n\r\n* 100% Twisted: removed all threading and asyncore code completely.\r\n* Significan API changes.\r\n* Dropped the web API.\r\n\r\nFrom PyDirector 1.0.0 to 1.1.1 (AKA txLoadBalancer 0.9.1)\r\n---------------------------------------------------------\r\n\r\n* Added support for Twisted, providing the option for all management, admin and\r\n load-balancing to utilize the Twisted reactor, skipping threading and asycore\r\n altogether.\r\n\r\nFrom PyDirector 0.0.7 to 1.0.0\r\n------------------------------\r\n\r\n* Very few, mostly this is to update the project to 'stable' status.\r\n* The networking code now uses twisted if available, and falls back\r\n to asyncore.\r\n\r\nFrom PyDirector 0.0.6 to 0.0.7\r\n------------------------------\r\n\r\n* You can specify a hostname of '*' to the listen directive for both\r\n the scheduler and the administrative interface to mean 'listen on\r\n all interfaces'. Considerably more obvious than '0.0.0.0'. Thanks\r\n to Andrew Sydelko for the idea.\r\n* New \"leastconnsrr\" scheduler - this is leastconns, with a roundrobin\r\n as well. Previously, leastconns would keep the list of hosts sorted,\r\n which often meant one system got beaten up pretty badly.\r\n* Twisted backend group selection works again.\r\n* The client address is now passed to the scheduler's getHost() method.\r\n This allows the creation of \"sticky\" schedulers, where a client is\r\n (by preference) sent to the same backend server. The factory function\r\n for schedulers will change to allow things like \"roundrobin,sticky\".\r\n\r\nFrom PyDirector 0.0.5 to 0.0.6\r\n------------------------------\r\n\r\n* fixed an error in the (hopefully rare) case where all backend servers\r\n are down.\r\n* the main script uses resource.setrlimit() to boost the number of open\r\n filedescriptors (solaris has stupidly low defaults)\r\n* when all backend servers are down, the manager thread goes into a much\r\n more aggressive mode re-adding them.\r\n* handle comments in the config file\r\n\r\nFrom PyDirector 0.0.4 to 0.0.5\r\n------------------------------\r\n\r\n* bunch of bugfixes to the logging\r\n* re-implemented the networking code using the 'twisted' framework; a simple\r\n loopback test with asyncore based pydir:\r\n\r\n Requests per second: 107.72\r\n Transfer rate: 2462.69 kb/s received\r\n\r\n the same test with twisted-based pydir:\r\n\r\n Requests per second: 197.90\r\n Transfer rate: 4519.69 kb/s received\r\n\r\nFrom PyDirector 0.0.3 to 0.0.4\r\n------------------------------\r\n\r\n* can now specify more than one listener for a service\r\n* 'client' in the config XML is now 'host'\r\n* fixed a bug in leastconns and roundrobin scheduler if all backends\r\n were unavailable.\r\n* whole lotta documentation added.\r\n* running display in web api now shows count of total connections\r\n* running display now has refresh and auto-refresh\r\n* compareconf module - takes a running config and a new config and\r\n emits the web api commands needed to make the running config match\r\n the new config\r\n* first cut at enabling https for web interface (needs m2crypto)\r\n\r\nFrom PyDirector 0.0.2 to 0.0.3\r\n------------------------------\r\n\r\n* delHost hooked up\r\n* running.xml added - XML dump of current config\r\n* centralised logging - the various things that write logfile\r\n entries need to be made consistent, and a lot of additional\r\n logging needs to be added.\r\n* Python2.1 compatibility fix: no socket.gaierror exception on 2.1\r\n\r\nFrom PyDirector 0.0.1 to 0.0.2\r\n------------------------------\r\n\r\n* refactored web publishing (babybobo)\r\n* package-ised and distutil-ised the code", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://launchpad.net/txloadbalancer", "keywords": "twisted, tcp, load, load balancer, load balancing, pydirector, pythondirector", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "txLoadBalancer", "package_url": "https://pypi.org/project/txLoadBalancer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/txLoadBalancer/", "project_urls": { "Homepage": "https://launchpad.net/txloadbalancer" }, "release_url": "https://pypi.org/project/txLoadBalancer/1.1.0/", "requires_dist": null, "requires_python": null, "summary": "txLoadBalancer - A Twisted-based TCP load balancer.", "version": "1.1.0" }, "last_serial": 801102, "releases": { "0.9.1": [ { "comment_text": "", "digests": { "md5": "b5f89b10f49040f510afc3ffa6d7f93d", "sha256": "cdf91abe9b4efe06bdac1aa3c329971dee2cd648137a3be9d3b373ebcf273597" }, "downloads": -1, "filename": "txLoadBalancer-0.9.1-py2.4.egg", "has_sig": false, "md5_digest": "b5f89b10f49040f510afc3ffa6d7f93d", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 70039, "upload_time": "2008-06-21T21:26:17", "url": "https://files.pythonhosted.org/packages/dd/65/23ec0ee6e780c3e13ced4ddb5a0767a6a407c7abef0bf30f831df830a40d/txLoadBalancer-0.9.1-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "1677ca34d2783ef6f505f912fd074699", "sha256": "649bb2141eee83d2136a28e675b5719a77545c9c2d97939a9fa0492ce9870edf" }, "downloads": -1, "filename": "txLoadBalancer-0.9.1-py2.5.egg", "has_sig": false, "md5_digest": "1677ca34d2783ef6f505f912fd074699", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 69072, "upload_time": "2008-06-21T21:26:23", "url": "https://files.pythonhosted.org/packages/05/1c/24f59f188ac5aa99adc872f8f0ad98ac2b4c14bec1c59843417fcaff300e/txLoadBalancer-0.9.1-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "b1c1c9cbeb47973aa31971cc74f141b0", "sha256": "4fd2949321665df3d9ba7870ef6898bdb059b844965e91d044d27e4e58a94996" }, "downloads": -1, "filename": "txLoadBalancer-0.9.1.tar.gz", "has_sig": false, "md5_digest": "b1c1c9cbeb47973aa31971cc74f141b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25899, "upload_time": "2008-06-21T21:26:05", "url": "https://files.pythonhosted.org/packages/d9/49/f92ba3e720255dbd1a0843635641e5eb42d164ef71ae5c0b6407daa1a560/txLoadBalancer-0.9.1.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "168b5ccc4f4986a5ba14363ba02b6034", "sha256": "3bda3e37a1cd4ab01ff40128ab9cc3aee6772458ae2286c9bcdc59748fbe6f5b" }, "downloads": -1, "filename": "txLoadBalancer-1.0.1-py2.4.egg", "has_sig": false, "md5_digest": "168b5ccc4f4986a5ba14363ba02b6034", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 43019, "upload_time": "2008-06-21T21:45:33", "url": "https://files.pythonhosted.org/packages/42/1d/b9d123cc1142ede97e5a03ec51780006ce42ff59c056576eff17f52b734f/txLoadBalancer-1.0.1-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "5100193fbbab4e5b5cc2c2406eb199d9", "sha256": "97e826fa1f7ff74b391890e73ab45e5e4947e022911f5353db1b7820d3d2cc57" }, "downloads": -1, "filename": "txLoadBalancer-1.0.1-py2.5.egg", "has_sig": false, "md5_digest": "5100193fbbab4e5b5cc2c2406eb199d9", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 42433, "upload_time": "2008-06-21T21:46:48", "url": "https://files.pythonhosted.org/packages/a5/f0/78f595e8211355d3576d529da4799b0c9f746b61e66b05237a78ba33e58b/txLoadBalancer-1.0.1-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "1f37c5867b8dec2d3b6a7438ac5991c9", "sha256": "7c0efdaac4cdf68b9de50bbf11d2bba7515d5ab034f8d903c6a7149acb934a9e" }, "downloads": -1, "filename": "txLoadBalancer-1.0.1.tar.gz", "has_sig": false, "md5_digest": "1f37c5867b8dec2d3b6a7438ac5991c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18147, "upload_time": "2008-06-21T21:45:24", "url": "https://files.pythonhosted.org/packages/0d/52/21d8196b3f0bba5bbee98a5838944ef7043816a42011c3c454a654f1beeb/txLoadBalancer-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "2fe0612cb79dbf56ed5a6c0299e42936", "sha256": "e48262222c448018745b20fe0ea01dffc86aaebd4447e8d3e0b033b86d6d45cc" }, "downloads": -1, "filename": "txLoadBalancer-1.1.0-py2.4.egg", "has_sig": false, "md5_digest": "2fe0612cb79dbf56ed5a6c0299e42936", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 84531, "upload_time": "2008-07-05T08:53:48", "url": "https://files.pythonhosted.org/packages/43/05/3222b6a57665284a5867aa896a063302e32bff07ffd3d52ee92c952caf5d/txLoadBalancer-1.1.0-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "8d5da7389a69e5f2e15cb3eaaeee7e18", "sha256": "4fb16e713bbe572d90271e71cea28420bde5c8b58bdca1328cd7ba9d8f8511ae" }, "downloads": -1, "filename": "txLoadBalancer-1.1.0-py2.5.egg", "has_sig": false, "md5_digest": "8d5da7389a69e5f2e15cb3eaaeee7e18", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 83345, "upload_time": "2008-07-05T08:54:23", "url": "https://files.pythonhosted.org/packages/79/b5/b1b193200088e36079ca811a1aa9d5ba5992c8aa55c2805b35ef9585b619/txLoadBalancer-1.1.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "dc1e60fad0e094ba7fa424c5369ef148", "sha256": "c9d7ab1e6c1513995f33b12c5efa74b608025525a5d6dcfaaa8e6d0a35638122" }, "downloads": -1, "filename": "txLoadBalancer-1.1.0.tar.gz", "has_sig": false, "md5_digest": "dc1e60fad0e094ba7fa424c5369ef148", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40192, "upload_time": "2008-07-05T08:53:25", "url": "https://files.pythonhosted.org/packages/20/03/e51de40611999232c13be7131635edfdf3a664cd4a9bf8556ceedc583ec9/txLoadBalancer-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2fe0612cb79dbf56ed5a6c0299e42936", "sha256": "e48262222c448018745b20fe0ea01dffc86aaebd4447e8d3e0b033b86d6d45cc" }, "downloads": -1, "filename": "txLoadBalancer-1.1.0-py2.4.egg", "has_sig": false, "md5_digest": "2fe0612cb79dbf56ed5a6c0299e42936", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 84531, "upload_time": "2008-07-05T08:53:48", "url": "https://files.pythonhosted.org/packages/43/05/3222b6a57665284a5867aa896a063302e32bff07ffd3d52ee92c952caf5d/txLoadBalancer-1.1.0-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "8d5da7389a69e5f2e15cb3eaaeee7e18", "sha256": "4fb16e713bbe572d90271e71cea28420bde5c8b58bdca1328cd7ba9d8f8511ae" }, "downloads": -1, "filename": "txLoadBalancer-1.1.0-py2.5.egg", "has_sig": false, "md5_digest": "8d5da7389a69e5f2e15cb3eaaeee7e18", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 83345, "upload_time": "2008-07-05T08:54:23", "url": "https://files.pythonhosted.org/packages/79/b5/b1b193200088e36079ca811a1aa9d5ba5992c8aa55c2805b35ef9585b619/txLoadBalancer-1.1.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "dc1e60fad0e094ba7fa424c5369ef148", "sha256": "c9d7ab1e6c1513995f33b12c5efa74b608025525a5d6dcfaaa8e6d0a35638122" }, "downloads": -1, "filename": "txLoadBalancer-1.1.0.tar.gz", "has_sig": false, "md5_digest": "dc1e60fad0e094ba7fa424c5369ef148", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40192, "upload_time": "2008-07-05T08:53:25", "url": "https://files.pythonhosted.org/packages/20/03/e51de40611999232c13be7131635edfdf3a664cd4a9bf8556ceedc583ec9/txLoadBalancer-1.1.0.tar.gz" } ] }