{"id":34215,"date":"2022-07-25T15:16:50","date_gmt":"2022-08-27T11:03:58","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/"},"modified":"2024-01-15T08:12:12","modified_gmt":"2024-01-15T00:12:12","slug":"redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/","title":{"rendered":"Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09"},"content":{"rendered":"<p>\u5f53\u5bf9\u670d\u52a1\u5668\u7684\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u5347\u7ea7\u65f6\uff0c<br \/>\n\u624b\u52a8\u6267\u884cRedis Sentinel\u7684\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u5907\u5fd8\u3002<\/p>\n<p>\u4e3a\u4e86\u7f29\u77edSentinel\u68c0\u6d4b\u5230\u4e3b\u8282\u70b9\u6545\u969c\u7684\u65f6\u95f4\uff0c\u5efa\u8bae\u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb&#8230;<\/p>\n<p>\u4ee5\u4e0b\u662f\u516c\u5f0f\u6587\u6863\u4e2d\u5173\u4e8e\u624b\u52a8\u6545\u969c\u5207\u6362\u7684\u90e8\u5206\u63cf\u8ff0\u3002<\/p>\n<pre class=\"post-pre\"><code>SENTINEL failover &lt;master name&gt; Force a failover as if the master was not reachable, and without asking for agreement\r\nto other Sentinels (however a new version of the configuration will be published so that the other Sentinels will update their configurations).\r\n<\/code><\/pre>\n<h2>\u547d\u4ee4<\/h2>\n<p>\u6211\u4eec\u662f\u7528docker\u6765\u8fd0\u8425\u7684,\u5c31\u50cf\u8fd9\u6837.<\/p>\n<pre class=\"post-pre\"><code>docker exec -it docker_redis-sentinel1_1 bash\r\nredis-cli -p 26379\r\nSENTINEL failover mymaster\r\n<\/code><\/pre>\n<h2>\u4e3aRedis\u8282\u70b9\u7684\u6545\u969c\u8f6c\u79fb\u8fdb\u884c\u52a0\u6743\u3002<\/h2>\n<p>\u8bf7\u5c06\u4ee5\u4e0b\u5185\u5bb9\u7528\u4e2d\u6587\u8fdb\u884c\u6539\u5199\uff0c\u53ea\u9700\u8981\u4e00\u79cd\u9009\u9879\uff1a<br \/>\nhttp:\/\/download.redis.io\/redis-stable\/redis.conf<\/p>\n<p>\u5c06\u8fd9\u4e2a\u94fe\u63a5\u6539\u4e3a\u4e2d\u6587\uff1a<br \/>\nhttp:\/\/download.redis.io\/redis-stable\/redis.conf<\/p>\n<pre class=\"post-pre\"><code># The slave priority is an integer number published by Redis in the INFO output.\r\n# It is used by Redis Sentinel in order to select a slave to promote into a\r\n# master if the master is no longer working correctly.\r\n#\r\n# A slave with a low priority number is considered better for promotion, so\r\n# for instance if there are three slaves with priority 10, 100, 25 Sentinel will\r\n# pick the one with priority 10, that is the lowest.\r\n#\r\n# However a special priority of 0 marks the slave as not able to perform the\r\n# role of master, so a slave with priority of 0 will never be selected by\r\n# Redis Sentinel for promotion.\r\n#\r\n# By default the priority is 100.\r\nslave-priority 100\r\n<\/code><\/pre>\n<p>\u5c06 slave-priority \u8bbe\u5b9a\u4e3a\u5c0f\u4e8e100\u7684\u503c\u4ee5\u6539\u53d8\u4f18\u5148\u7ea7<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u5bf9\u670d\u52a1\u5668\u7684\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u5347\u7ea7\u65f6\uff0c \u624b\u52a8\u6267\u884cRedis Sentinel\u7684\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u5907\u5fd8\u3002 \u4e3a\u4e86\u7f29\u77edSenti [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34215","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-\u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09\" \/>\n<meta property=\"og:description\" content=\"\u5f53\u5bf9\u670d\u52a1\u5668\u7684\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u5347\u7ea7\u65f6\uff0c \u624b\u52a8\u6267\u884cRedis Sentinel\u7684\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u5907\u5fd8\u3002 \u4e3a\u4e86\u7f29\u77edSenti [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-\u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-27T11:03:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T00:12:12+00:00\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/\",\"name\":\"Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-08-27T11:03:58+00:00\",\"dateModified\":\"2024-01-15T00:12:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-\u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09\/","og_locale":"zh_CN","og_type":"article","og_title":"Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09","og_description":"\u5f53\u5bf9\u670d\u52a1\u5668\u7684\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u5347\u7ea7\u65f6\uff0c \u624b\u52a8\u6267\u884cRedis Sentinel\u7684\u6545\u969c\u8f6c\u79fb\u65f6\u7684\u5907\u5fd8\u3002 \u4e3a\u4e86\u7f29\u77edSenti [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-\u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-08-27T11:03:58+00:00","article_modified_time":"2024-01-15T00:12:12+00:00","author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/","name":"Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-08-27T11:03:58+00:00","dateModified":"2024-01-15T00:12:12+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Redis Sentinel \u624b\u52a8\u6267\u884c\u6545\u969c\u8f6c\u79fb\uff08\u5207\u6362\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/redis-sentinel-%e6%89%8b%e5%8a%a8%e6%89%a7%e8%a1%8c%e6%95%85%e9%9a%9c%e8%bd%ac%e7%a7%bb%ef%bc%88%e5%88%87%e6%8d%a2%ef%bc%89\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34215"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34215\/revisions"}],"predecessor-version":[{"id":57669,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34215\/revisions\/57669"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}