{ "info": { "author": "HoverHell", "author_email": "hoverhell@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "BeatCop\r\n=======\r\n\r\nBeatCop is a simple cluster singleton manager. It ensures that a managed\r\nprocess runs on exactly one node in a cluster at a time, no more, no\r\nless (assuming there is at least one node left alive).\r\n\r\nIt was created for managing `Celery\r\nbeat `__\r\nin an autoscaling pool of Celery workers but was written as generic\r\nprocess manager and can therefore be used for pretty much anything. It\r\nuses `Redis `__ to communicate.\r\n\r\nMechanism\r\n---------\r\n\r\nBeatCop uses an expiring Redis key (`SET EX\r\nNX `__) as a lock, which it continually\r\nrefreshes while the controlled process is running. If the BeatCop or the\r\nwhole node dies for any reason, drops off the network or loses\r\nconnection to Redis, the lock expires and a waiting BeatCop on another\r\nnode will then acquire the lock and launch a new process.\r\n\r\nThe lock is acquired (via SET NX) and refreshed (via a short LUA script)\r\natomically, so there should be no race conditions.\r\n\r\nBeatCop also tries very hard to make sure that if anything goes wrong,\r\nthe monitored process is stopped.\r\n\r\nPrerequisites\r\n-------------\r\n\r\n- A server running Redis 2.6.12 or higher to which all nodes can\r\n connect.\r\n\r\nInstallation\r\n------------\r\n\r\n::\r\n\r\n # Make a virtualenv if you like first\r\n pip install -r requirements.txt\r\n ./beatcop.py /path/to/beatcop.ini\r\n\r\nIt is typically a good idea to run BeatCop in something that will\r\nrestart it if it dies, such as\r\n`daemon-tools `__ or the dreaded\r\nUpstart.\r\n\r\nConfiguration\r\n-------------\r\n\r\nSee example ``beatcop.ini``.\r\n\r\nCaveats\r\n-------\r\n\r\nBeatCop relies on Redis connectivity. If Redis updates fail, BeatCop\r\nwill stop the controlled process and exit, hoping that at least one\r\nother node can still talk to Redis and spawn a new process. If all nodes\r\nlose Redis connectivity, this will obviously fail. BeatCop now supports\r\nRedis Cluster (see example ``beatcop.ini``), which means Redis no longer\r\nhas to be the single point of failure.\r\n\r\nBeatCop does not currently work via `nutcracker\r\n(twemproxy) `__.\r\n\r\nLicense\r\n-------\r\n\r\nMIT - see `LICENSE `__ file.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Luluvise/BeatCop", "keywords": "", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "BeatCop", "package_url": "https://pypi.org/project/BeatCop/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/BeatCop/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Luluvise/BeatCop" }, "release_url": "https://pypi.org/project/BeatCop/1.0/", "requires_dist": null, "requires_python": null, "summary": "Cluster singleton manager", "version": "1.0" }, "last_serial": 2186390, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "fb72be9daf98497281d51f67e63e9266", "sha256": "958269d7cfcbebf8e64e54fe27aeb33d536ecb1ddb45f34b34942ce366d67705" }, "downloads": -1, "filename": "BeatCop-1.0.tar.gz", "has_sig": false, "md5_digest": "fb72be9daf98497281d51f67e63e9266", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5480, "upload_time": "2016-06-24T16:53:59", "url": "https://files.pythonhosted.org/packages/b3/b7/b2bd1f80645acc2d4d0ceeb9afab417fd040d1ec699c0ba15fca3fffc7a1/BeatCop-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fb72be9daf98497281d51f67e63e9266", "sha256": "958269d7cfcbebf8e64e54fe27aeb33d536ecb1ddb45f34b34942ce366d67705" }, "downloads": -1, "filename": "BeatCop-1.0.tar.gz", "has_sig": false, "md5_digest": "fb72be9daf98497281d51f67e63e9266", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5480, "upload_time": "2016-06-24T16:53:59", "url": "https://files.pythonhosted.org/packages/b3/b7/b2bd1f80645acc2d4d0ceeb9afab417fd040d1ec699c0ba15fca3fffc7a1/BeatCop-1.0.tar.gz" } ] }