{ "info": { "author": "CustomMade Ventures", "author_email": "sawdust@custommade.com", "bugtrack_url": null, "classifiers": [], "description": "========================\nDistributed Redis client\n========================\n\nDistributed Redis Client (disredis) to enable real-time failover of \nredis masters to paired slaves, providing improved availability and reliability \nwhere needed.\n\nThe DisredisClient class can be used in place of a StrictRedis client. \nInstead of passing the host and port in, pass in a list of Sentinel addresses in\nthe form of \"host:port\". It will connect to the first responding Sentinel\nand query it for masters that it knows about. These masters will become the\nnodes that are sharded across. As long as the number of masters does not\nchange, the sharding will be stable even if there is a node failure.\n\nNode failures are handled by asking the Sentinel for the updated master of\nthe given node. During the initial failure, some requests may error out\nwith a ConnectionError if they are made between when the node fails and\nwhen Sentinel executes the fail-over procedure.\n\nRedis and Sentinel Configuration\n================================\n\nWe recommend using at least Redis version 2.6.13.\n\nFor testing you need a minimum of two sentinels and two redis instances \n(one master and one slave) to test fail over.\n\nFor production we recommend at least two servers. Each server should run \ntwo sentinels and at least one master and one slave redis instance, \nrunning on opposite servers.\n::\n | Server One | | Server Two |\n |----------------| |----------------|\n | Sentinel01 | | Sentinel03 |\n | Sentinel02 | | Sentinel04 |\n | Redis01-Master | | Redis01-Slave |\n | Redis02-Slave | | Redis02-Master |\n | ... | | ... |\n\n**Important:** If you are running on AWS please ensure your django servers \ncan connect to the internal IP of the AWS redis servers. AWS ec2 instances \nresolve to their internal IP which results in sentinels returning the \ninternal IP when queried. To check the IP address of redis instances run \nthe following command:\n\n redis-cli -p sentinel masters\n\nExample Sentinel Configuration:\n\n port 26379 #Sentinel Port\n\n sentinel monitor redis-Redis1 server1.com 6382 2\n sentinel down-after-milliseconds redis-Redis1 60000\n sentinel failover-timeout redis-Redis1 900000\n sentinel can-failover redis-Redis1 yes\n sentinel parallel-syncs redis-Redis1 1\n\n sentinel monitor redis-Redis2 server2.com 6383 2\n sentinel down-after-milliseconds redis-Redis2 60000\n sentinel failover-timeout redis-Redis2 900000\n sentinel can-failover redis-Redis2 yes\n sentinel parallel-syncs redis-Redis2 1\n\nPlease check the redis documentation for more details on Redis and \nSentinel installation and configuration.\n\nWe also recommend using Supervisor or similar to manage the various \nRedis and Sentinel instances.\n\nDjango Setup\n============\n\nEither download from github and run\n \n python setup.py install\n\nor\n\n pip install disredis\n\nAdd the disredis code to the django app.\n\nAdd the following to django settings\n\n SESSION_COOKIE_AGE = 2592000 # thirty days - Adjust to your needs\n\n SESSION_REDIS_PREFIX = ''\n SESSION_REDIS_HOST = 'localhost'\n SESSION_REDIS_DB = 6\n\n SESSION_ENGINE = 'disredis_sessions.session'\n\n SESSION_REDIS_SENTINEL_URLS = [\n 'SENTINEL_SERVER:SENTINEL_PORT',\n ...]\n\nRestart django to start using Redis for user sessions\n\nTroubleshooting\n===============\n\nEnsure the django application servers can connect to the redis \nand sentinel ports.\n\nRun the following command on the redis servers to check all \nredis instances are listed (check IP and master/slave status):\n\n $ redis-cli -p sentinel master", "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/SawdustSoftware/disredis", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "disredis", "package_url": "https://pypi.org/project/disredis/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/disredis/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/SawdustSoftware/disredis" }, "release_url": "https://pypi.org/project/disredis/1.0/", "requires_dist": null, "requires_python": null, "summary": "Distributed Redis Client (dis-redis) to enable real-time failover of redis masters to paired slaves", "version": "1.0" }, "last_serial": 783632, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "d94efa723073e12893c395bf829f7d9e", "sha256": "eb4527929e3ca2c4f1a4ae54b0f8829579605121f83edcaa86f584b1f7b5ce21" }, "downloads": -1, "filename": "disredis-1.0.tar.gz", "has_sig": false, "md5_digest": "d94efa723073e12893c395bf829f7d9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13238, "upload_time": "2013-07-01T11:08:05", "url": "https://files.pythonhosted.org/packages/b2/47/bfc1d031f3e72e8d1e25801c4c8e5bd1483c327e7af407257ada2820c7b7/disredis-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d94efa723073e12893c395bf829f7d9e", "sha256": "eb4527929e3ca2c4f1a4ae54b0f8829579605121f83edcaa86f584b1f7b5ce21" }, "downloads": -1, "filename": "disredis-1.0.tar.gz", "has_sig": false, "md5_digest": "d94efa723073e12893c395bf829f7d9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13238, "upload_time": "2013-07-01T11:08:05", "url": "https://files.pythonhosted.org/packages/b2/47/bfc1d031f3e72e8d1e25801c4c8e5bd1483c327e7af407257ada2820c7b7/disredis-1.0.tar.gz" } ] }