{"id":4093,"date":"2017-10-30T09:05:19","date_gmt":"2017-10-30T16:05:19","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=4093"},"modified":"2025-06-13T15:55:15","modified_gmt":"2025-06-13T22:55:15","slug":"fast-failover-couchbase-server-5","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/","title":{"rendered":"Fast Failover with Couchbase Server 5.0"},"content":{"rendered":"<div class=\"paragraph\">\n<p>Fast failover is one of the many improvements that come with the release of <a href=\"https:\/\/www.couchbase.com\/downloads\/\">Couchbase Server 5.0<\/a> (now available for download).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Failover is one of the important concepts to understand when it comes to distributed databases. <a href=\"https:\/\/www.infoq.com\/articles\/cap-twelve-years-later-how-the-rules-have-changed\">The CAP theorem<\/a> states that a distributed database can\u2019t be both available <em>and<\/em> consistent <em>all<\/em> of the time. Couchbase Server\u2019s architecture is designed to be <em>always<\/em> consistent, and partition tolerate. With fast failover, Couchbase Server is closing the gap on <a href=\"https:\/\/www.couchbase.com\/blog\/combine-clusters-to-achieve-high-availability\/\">high availability<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>In this blog post, I\u2019m going to demonstrate failover in action. I\u2019ll be using Docker to create a cluster of 3 Couchbase nodes on my local machine.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><em>You can follow along with the code sample in this blog post: it is <a href=\"https:\/\/github.com\/couchbaselabs\/blog-source-code\/tree\/master\/Groves\/084FastFailoverNet\/src\/FastFailoverDemo\">available on GitHub<\/a>.<\/em><\/p>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_fast_failover_overview\">Fast failover overview<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>You\u2019ll need a bit of setup and preparation.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>First, create a 3-node (at least) Couchbase Server cluster. There are a number of ways to do this, including <a href=\"https:\/\/github.com\/couchbaselabs\/vagrants\">Vagrants<\/a>, Virtual Machines, actual machines, <a href=\"https:\/\/www.couchbase.com\/blog\/azure-getting-started-easy-free\/\">Azure<\/a>, and more.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>I chose to use Docker. I blogged about how to <a href=\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\">create a Couchbase Cluster on Docker and access it with a .NET Core application<\/a> (don\u2019t forget the bridge network!). So, I just followed those same instructions again. The only difference is that I used a console application instead of an ASP.NET application (which you can read more about later in this post).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/10\/08401-three-couchbase-nodes.png\" alt=\"Three Couchbase Server nodes\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>I used the <a href=\"https:\/\/hub.docker.com\/r\/couchbase\/server\/tags\/\">Couchbase Server 5.0.0-beta2 image from Docker Hub<\/a>, but by the time you read this, an official release of Couchbase Server 5.0 should be <a href=\"https:\/\/hub.docker.com\/r\/library\/couchbase\/tags\/\">available on the official docker Couchbase repository<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Next, I created a bucket called &#8220;mybucket&#8221;. Make sure to enable replicas to create additional cop(ies) of data within the same cluster.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/10\/08402-bucket.png\" alt=\"Couchbase Server bucket\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>After that, create a user (I called mine &#8220;myuser&#8221;) with at least Data Writer and Data Reader permission for &#8220;mybucket&#8221;). <em>If you aren\u2019t familiar yet with the Couchbase Server <a href=\"https:\/\/www.couchbase.com\/blog\/introducing-rbac-security-for-collections\/\">Role-based Access Control (RBAC)<\/a>, start with <a href=\"https:\/\/www.couchbase.com\/blog\/authentication-authorization-rbac-net\/\">this blog post on Authentication with RBAC and .NET.<\/a><\/em><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/10\/08403-user.png\" alt=\"Couchbase Server user\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Finally, turn on automatic fast failover. From the Couchbase Console, go to Settings, and then Auto-Failover. Check the box to &#8220;Enable auto-failover&#8221;. As of version 5.0, you can set the Timeout value to as low as 5 (seconds). Previously, the value had to be at least 30 seconds.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/10\/08404-fast-failover-enable.png\" alt=\"Enable fast failover\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><em>There is a reason that auto-failover is off by default. Please review the full <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/clustersetup\/automatic-failover.html\">documentation on automatic failover<\/a> to make sure that it\u2019s a right fit for you.<\/em><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"__net_example\">.NET Example<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Now that you have a 3-node cluster running inside of your Docker host, it\u2019s time to write a demonstration application. I decided to write a console application that would continuously perform reads against Couchbase. At some point, I will &#8220;pull the plug&#8221; on one of the nodes to show automatic fast failover in action.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_connecting_to_the_cluster\">Connecting to the cluster<\/h3>\n<div class=\"paragraph\">\n<p>After creating a new .NET Core console application in Visual Studio, I added the <a href=\"https:\/\/www.nuget.org\/packages\/CouchbaseNetClient\/\">Couchbase .NET SDK (currently version 2.5.1) using NuGet<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Then, I created a configuration to connect to the 3-node cluster, authenticate to &#8220;myuser&#8221;, and open up &#8220;mybucket&#8221;.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">var clientConfig = new ClientConfiguration\r\n{\r\n    Servers = new List&lt;Uri&gt;\r\n    {\r\n        new Uri(\"https:\/\/172.17.0.2\"),\r\n        new Uri(\"https:\/\/172.17.0.3\"),\r\n        new Uri(\"https:\/\/172.17.0.4\")\r\n    }\r\n};\r\nvar cluster = new Cluster(clientConfig);\r\n\r\nvar credentials = new PasswordAuthenticator(\"myuser\", \"password\");\r\ncluster.Authenticate(credentials);\r\n\r\n_bucket = cluster.OpenBucket(\"mybucket\");<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Those IP addresses are the addresses that are <em>internal<\/em> to the Docker host. This .NET Core application will also be running inside the Docker host, where those IP addresses will resolve. From <em>outside<\/em> the docker host, only &#8220;localhost:8091&#8221; will resolve (assuming you are following the <a href=\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\">tutorial<\/a> I linked to earlier). If you are not using Docker, put in the IP addresses of the Azure machines, the VMs, etc, instead.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Next, <code>PasswordAuthentication<\/code> is used to ensure bucket access.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Finally, get a bucket object using <code>OpenBucket<\/code>.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_setting_up_documents\">Setting up documents<\/h3>\n<div class=\"paragraph\">\n<p>For this demonstration, I want to setup a bunch of documents that I will later be reading from, repeatedly. First, I wrote a loop to create some arbitrary number of documents, that each have a key like &#8220;documentKey[num]&#8221; (e.g. &#8220;documentKey1&#8221;, &#8220;documentKey2&#8221;, etc).<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">var docKeys = new List&lt;string&gt;();\r\nfor (var i = 0; i &lt; numDocuments; i++)\r\n{\r\n    var key = \"documentKey\" + i;\r\n    docKeys.Add(key);\r\n    _bucket.Upsert(key, new { name = \"Document\" + i });\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>In my code, <code>numDocuments<\/code> is set to 50. But if you are following along, feel free to set it to another number and see what happens.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_reading_documents\">Reading documents<\/h3>\n<div class=\"paragraph\">\n<p>Therefore, there are 50 documents with well-known keys. The rest of the program will be continuously looping. Each loop iteration will attempt to retreive all 50 documents.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">var iteration = 0;\r\nwhile (true)\r\n{\r\n    Console.WriteLine($\"Getting {numDocuments} documents [{iteration++}]\");\r\n    foreach(var docKey in docKeys)\r\n    {\r\n        var result = _bucket.Get&lt;dynamic&gt;(docKey);\r\n        if(terse)\r\n            ShowResultTerse(result, docKey);\r\n        else\r\n            ShowResult(result, docKey);\r\n    }\r\n    Console.WriteLine();\r\n\r\n    Thread.Sleep(2000);\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>First, notice that there\u2019s a loop within the loop. The inner loop will run 50 times to perform a <code>Get<\/code> on each document. <code>ShowResult<\/code> will then output what\u2019s going on to the console (<code>ShowResultTerse<\/code> does the same thing, just in a much more compact fashion. <code>ShowResult<\/code> is below, but later screenshots will be using <code>ShowResultTerse<\/code>).<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">private static void ShowResult(IOperationResult&lt;dynamic&gt; result, string id)\r\n{\r\n    \/\/ happy path, document was found\r\n    if (result.Success)\r\n    {\r\n        Console.WriteLine(\"Result: success\");\r\n        return;\r\n    }\r\n\r\n    \/\/ error, possibly node down\r\n    \/\/ show error, try to get replica\r\n    Console.WriteLine($\"Result: unsuccessful {result.Message}\");\r\n    Console.WriteLine(\"\\tAttempting to get replica.\");\r\n\r\n    var replica = _bucket.GetFromReplica&lt;dynamic&gt;(id);\r\n\r\n    \/\/ happy path for replica, it was found\r\n    if (replica.Success)\r\n    {\r\n        Console.WriteLine(\"\\tReplica result: success\");\r\n        return;\r\n    }\r\n\r\n    \/\/ error! replication may not be configured\r\n    \/\/ or it's possible something catastrophic happened\r\n    \/\/ this should be rare, but definitely want to log it\r\n    \/\/ maybe retry and\/or escalate\r\n    \/\/ in this example, it's just logged to console\r\n    Console.WriteLine(\"\\tReplica result unsuccessful: {result.Message}\");\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>The comments will help you follow along, but <code>ShowResult<\/code> does three checks:<\/p>\n<\/div>\n<div class=\"olist arabic\">\n<ol class=\"arabic\">\n<li>Was the read successful? If so, output that. Done! Otherwise\u2026<\/li>\n<li>Try to get a replica (from another node). Was THAT successful? If so, output that. Done! Otherwise\u2026<\/li>\n<li>The application was unable to read the document or one of its replicas. In this example, that\u2019s going to be very rare. In reality, it could mean that the document doesn\u2019t exist, or replication isn\u2019t configured correctly, or something else has gone wrong.<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>So, you\u2019re ready to run the application. If you\u2019re using Docker, don\u2019t forget to run this application in Docker (which is <a href=\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\">easy to do from Visual Studio<\/a>). <em>(Also make sure to connect the .NET Core application container to the Docker bridge network).<\/em><\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_pull_the_plug\">Pull the plug!<\/h3>\n<div class=\"paragraph\">\n<p>Before pulling the plug on one of the nodes, let\u2019s take a look at what the &#8220;normal&#8221; output is when running the above .NET Core application.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>In the below GIF, you\u2019ll see:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>A three node Couchbase Server cluster<\/li>\n<li>Switch over to Visual Studio<\/li>\n<li>Build and start the Docker container with CTRL+F5<\/li>\n<li>The (terse) console output of the Docker container<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5660 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/10\/08405-docker-output-min-compressed.gif\" alt=\"Console output from Docker\" width=\"700\" height=\"379\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>(I\u2019ve sped up the animation a bit). Notice that &#8220;S&#8221; is being shown 50 times. This means that each document was (s)uccessfully retrieved.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Next, let\u2019s show fast failover in action. I\u2019m going to &#8220;pull the plug&#8221; on one of the nodes. With Docker, I can execute <code>docker stop db2<\/code>, for example.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>There is a lot to keep track of at one time, so I\u2019ve created a short video that demonstrates what\u2019s going on.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>[youtube https:\/\/www.youtube.com\/watch?v=KbU5eG2R9XU&amp;w=700&amp;h=394]<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>What you\u2019re seeing in that video is:<\/p>\n<\/div>\n<div class=\"olist arabic\">\n<ol class=\"arabic\">\n<li>Normal operation (all &#8220;S&#8221; for success)<\/li>\n<li>A node being stopped (with Docker)<\/li>\n<li>Couchbase detecting a node being down.<\/li>\n<li>Couchbase initiating fast failover to activate replicas.<\/li>\n<li>During that failover period, it\u2019s no longer all &#8220;S&#8221;. There are some &#8220;R&#8221; for replicas (which are read only) in there too.<\/li>\n<li>When the failover is complete, the results go back to all &#8220;S&#8221; again.<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>The goal of fast failover is to reduce the period of time where not all documents are entirely available.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_summary\">Summary<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Couchbase Server 5.0 has improved failover with a &#8220;fast failover&#8221; option that can be useful for environments with solid networking in place.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>This blog post shows off a console app that\u2019s meant to demonstrate fast failover. It\u2019s not a very useful app outside of that, but you can take the principles and apply them to an ASP.NET or ASP.NET Core website.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Check out <a href=\"https:\/\/couchbase.com\/downloads\/\">Couchbase Server 5.0<\/a> today for this and other great new features.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Special thanks to <a href=\"https:\/\/www.couchbase.com\/blog\/author\/jeff-morris\/\">Jeff Morris<\/a> and the SDK team for helping out with this blog post!<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Here are some links for more information on fast failover:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>The <a href=\"https:\/\/github.com\/couchbaselabs\/sdk-rfcs\/blob\/master\/rfc\/0024-fast-failover.md\">SDK RFC<\/a> for fast failover. This document covers .NET, but also Java, libcouchbase, and Go.<\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/clustersetup\/automatic-failover.html\">Automatic failover documentation<\/a> for Couchbase Server.<\/li>\n<li><a href=\"https:\/\/github.com\/couchbaselabs\/blog-source-code\/tree\/master\/Groves\/084FastFailoverNet\/src\/FastFailoverDemo\">Source code for the .NET Core console app<\/a> used in this blog post (GitHub)<\/li>\n<li>Two JIRA tickets for .NET fast failover: <a href=\"https:\/\/issues.couchbase.com\/browse\/NCBC-1366\">NCBC-1366<\/a> and <a href=\"https:\/\/issues.couchbase.com\/browse\/NCBC-1388\">NCBC-1388<\/a>.<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>If you have questions or comments on failover, make sure to check out the <a href=\"https:\/\/www.couchbase.com\/forums\/\">Couchbase forums<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Please leave your questions and comments on all things .NET and Couchbase or find me on <a href=\"https:\/\/twitter.com\/mgroves\">Twitter @mgroves<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Fast failover is one of the many improvements that come with the release of Couchbase Server 5.0 (now available for download). Failover is one of the important concepts to understand when it comes to distributed databases. The CAP theorem states [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":4098,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1811,1816],"tags":[1519],"ppma_author":[8937],"class_list":["post-4093","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-couchbase-server","tag-docker"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fast Failover with Couchbase Server 5.0 - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Fast failover is a new feature of Couchbase Server 5.0. This blog post demonstrates with a .NET Core console application and a Docker cluster.\" \/>\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.couchbase.com\/blog\/fast-failover-couchbase-server-5\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fast Failover with Couchbase Server 5.0\" \/>\n<meta property=\"og:description\" content=\"Fast failover is a new feature of Couchbase Server 5.0. This blog post demonstrates with a .NET Core console application and a Docker cluster.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-30T16:05:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-13T22:55:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"681\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Matthew Groves\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mgroves\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matthew Groves\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/\"},\"author\":{\"name\":\"Matthew Groves\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\"},\"headline\":\"Fast Failover with Couchbase Server 5.0\",\"datePublished\":\"2017-10-30T16:05:19+00:00\",\"dateModified\":\"2025-06-13T22:55:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/\"},\"wordCount\":1292,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg\",\"keywords\":[\"docker\"],\"articleSection\":[\".NET\",\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/\",\"name\":\"Fast Failover with Couchbase Server 5.0 - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg\",\"datePublished\":\"2017-10-30T16:05:19+00:00\",\"dateModified\":\"2025-06-13T22:55:15+00:00\",\"description\":\"Fast failover is a new feature of Couchbase Server 5.0. This blog post demonstrates with a .NET Core console application and a Docker cluster.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg\",\"width\":1024,\"height\":681,\"caption\":\"https:\/\/commons.wikimedia.org\/wiki\/File:Holborn_Tube_Station_Escalator.jpg - Creative Commons - \\\"Holborn Tube Station Escalator\\\" by renaissancechambara\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fast Failover with Couchbase Server 5.0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\",\"name\":\"Matthew Groves\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"caption\":\"Matthew Groves\"},\"description\":\"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.\",\"sameAs\":[\"https:\/\/crosscuttingconcerns.com\",\"https:\/\/x.com\/mgroves\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/matthew-groves\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Fast Failover with Couchbase Server 5.0 - The Couchbase Blog","description":"Fast failover is a new feature of Couchbase Server 5.0. This blog post demonstrates with a .NET Core console application and a Docker cluster.","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.couchbase.com\/blog\/fast-failover-couchbase-server-5\/","og_locale":"en_US","og_type":"article","og_title":"Fast Failover with Couchbase Server 5.0","og_description":"Fast failover is a new feature of Couchbase Server 5.0. This blog post demonstrates with a .NET Core console application and a Docker cluster.","og_url":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-10-30T16:05:19+00:00","article_modified_time":"2025-06-13T22:55:15+00:00","og_image":[{"width":1024,"height":681,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg","type":"image\/jpeg"}],"author":"Matthew Groves","twitter_card":"summary_large_image","twitter_creator":"@mgroves","twitter_misc":{"Written by":"Matthew Groves","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/"},"author":{"name":"Matthew Groves","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58"},"headline":"Fast Failover with Couchbase Server 5.0","datePublished":"2017-10-30T16:05:19+00:00","dateModified":"2025-06-13T22:55:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/"},"wordCount":1292,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg","keywords":["docker"],"articleSection":[".NET","Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/","url":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/","name":"Fast Failover with Couchbase Server 5.0 - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg","datePublished":"2017-10-30T16:05:19+00:00","dateModified":"2025-06-13T22:55:15+00:00","description":"Fast failover is a new feature of Couchbase Server 5.0. This blog post demonstrates with a .NET Core console application and a Docker cluster.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/10\/084-hero-escalator-failover.jpg","width":1024,"height":681,"caption":"https:\/\/commons.wikimedia.org\/wiki\/File:Holborn_Tube_Station_Escalator.jpg - Creative Commons - \"Holborn Tube Station Escalator\" by renaissancechambara"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/fast-failover-couchbase-server-5\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Fast Failover with Couchbase Server 5.0"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58","name":"Matthew Groves","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54","url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","caption":"Matthew Groves"},"description":"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.","sameAs":["https:\/\/crosscuttingconcerns.com","https:\/\/x.com\/mgroves"],"url":"https:\/\/www.couchbase.com\/blog\/author\/matthew-groves\/"}]}},"authors":[{"term_id":8937,"user_id":71,"is_guest":0,"slug":"matthew-groves","display_name":"Matthew Groves","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","author_category":"","last_name":"Groves","first_name":"Matthew","job_title":"","user_url":"https:\/\/crosscuttingconcerns.com","description":"Matthew D. Groves is a guy who loves to code.  It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything.  He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s.  He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community.  He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=4093"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4093\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/4098"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=4093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=4093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=4093"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=4093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}