{"id":3373,"date":"2017-06-06T08:00:16","date_gmt":"2017-06-06T15:00:16","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=3373"},"modified":"2025-06-13T18:46:07","modified_gmt":"2025-06-14T01:46:07","slug":"simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/","title":{"rendered":"Simplify Your NoSQL Cluster by Moving From MongoDB Sharding to Couchbase Containers"},"content":{"rendered":"<p>When I&#8217;m out at events and talking to NoSQL users and advocates, I often hear stories on why people have decided to start using Couchbase after having come from MongoDB. \u00a0Take, for example, an <a href=\"https:\/\/www.couchbase.com\/blog\/ndp-episode-3-switching-from-a-relational-database-to-nosql\/\" target=\"_blank\" rel=\"noopener noreferrer\">interview I did with Tom Coates from Nuance<\/a>. \u00a0A big reason Nuance decided to drop MongoDB is because of its inability to scale in a simplified fashion. This is not the first time I&#8217;ve heard this story.<\/p>\n<p>We&#8217;re going to explore what&#8217;s involved in scaling a NoSQL cluster with MongoDB and then accomplishing the same thing with <a href=\"https:\/\/www.couchbase.com\" target=\"_blank\" rel=\"noopener noreferrer\">Couchbase<\/a>.<\/p>\n<p><!--more--><\/p>\n<p><span style=\"font-weight: 400\">For MongoDB, sharding is one popular way to s<\/span>cale. Other databases approach the NoSQL clustering process differently. In every case, we&#8217;re interested in creating a multiple node cluster that includes data replication.<\/p>\n<h2>Creating a Multiple Node MongoDB Cluster<\/h2>\n<p>MongoDB is a NoSQL document database that has a master-slave architecture. When creating a cluster and scaling it, you&#8217;re to create and manage a <a href=\"https:\/\/docs.mongodb.com\/manual\/tutorial\/deploy-shard-cluster\/\" target=\"_blank\" rel=\"noopener noreferrer\">sharded cluster<\/a> and a <a href=\"https:\/\/docs.mongodb.com\/manual\/tutorial\/deploy-replica-set\/\" target=\"_blank\" rel=\"noopener noreferrer\">replication set<\/a>, which is another name for a replication cluster. These are pieces to a potentially large puzzle, and you&#8217;ll see how it can easily become complicated.<\/p>\n<p>Because we plan to do everything locally, Docker becomes a good candidate for the job. \u00a0We&#8217;re going to deploy several MongoDB Docker containers and scale them as part of a cluster.<\/p>\n<p>The first order of business is to deploy all the necessary nodes for our cluster. \u00a0Using the Docker CLI, execute the following commands:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">docker run -d -p 27017-27019:27017-27019 -p 28017:28017 --name mongocfg1 mongo mongod --configsvr --replSet rs0\r\ndocker run -d -p 37017-37019:27017-27019 -p 38017:28017 --name mongoshd1 mongo mongod --shardsvr --replSet rs1\r\ndocker run -d -p 47017-47019:27017-27019 -p 48017:28017 --name mongoshd2 mongo mongod --shardsvr --replSet rs1<\/pre>\n<p>The above commands will create a configuration node\u00a0that uses an\u00a0<code>rs0<\/code> replica set as well as two shard nodes that use an\u00a0<code>rs1<\/code> replica set. \u00a0We&#8217;re just now starting our MongoDB instances and we&#8217;ve already got two different node types and replica sets to worry about.<\/p>\n<p>Now we need to connect them all together to get replication and sharding in a functional state.<\/p>\n<p>Let&#8217;s start by initializing replication on the two shard nodes that use the\u00a0<code>rs1<\/code> replica set. \u00a0We&#8217;ll need to determine their container IP addresses to accomplish the job. \u00a0From the Docker CLI, execute the following:<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">docker inspect mongoshd1\r\ndocker inspect mongoshd2<\/pre>\n<p>After obtaining the IP addresses, connect to one of the shard nodes via the following command:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">docker exec -it mongoshd1 bash<\/pre>\n<p>This allows us to control the container with the interactive shell. \u00a0To initialize replication on these nodes, we need to launch the Mongo shell from the connected container:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">mongo --port 27018<\/pre>\n<p>Once connected via the Mongo shell, execute the following:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">rs.initiate({\r\n    _id : \"rs1\",\r\n    members: [\r\n        { _id : 1, host : \"172.17.0.3:27018\" }, \r\n        { _id : 2, host : \"172.17.0.4:27018\" }\r\n    ]\r\n});<\/pre>\n<p>In the above command, remember to swap out the container IP addresses with the shard nodes you actually wish to use.<\/p>\n<p>Once executed, you&#8217;ll be able to check the status of the nodes via the\u00a0<code>rs.status()<\/code> command.<\/p>\n<p>Now we need to prepare the configuration node. \u00a0First determine the container IP like previously demonstrated and connect to it via:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">docker exec -it mongocfg1 bash<\/pre>\n<p>Once connected with the interactive shell, you&#8217;ll need to connect to MongoDB using the Mongo shell, but this time via a different port since it is a configuration node:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">mongo --port 27019<\/pre>\n<p>Once connected to the configuration node via the Mongo shell, execute the following command to initialize the replica set:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">rs.initiate({\r\n    _id : \"rs0\",\r\n    members: [\r\n        { _id : 0, host : \"172.17.0.2:27019\" },\r\n    ]\r\n});<\/pre>\n<p>At this point we should be able to start configuring the shard nodes. \u00a0Remember, previously we only configured the replicas on the shard nodes. \u00a0Exit the Mongo shell on the configuration node, but don&#8217;t leave the interactive shell. \u00a0We need to run a new command called <a href=\"https:\/\/docs.mongodb.com\/manual\/reference\/program\/mongos\/\" target=\"_blank\" rel=\"noopener noreferrer\">mongos<\/a>, to do even more configuration. \u00a0Execute the following:<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">mongos --configdb rs0\/172.17.0.2:27019<\/pre>\n<p>This will allow us to add shards via the Mongo shell. \u00a0Unless you chose to run mongos in the background, you&#8217;ll need to open a new Terminal to use the Mongo shell.<\/p>\n<p>Connect to\u00a0<code>mongocfg1<\/code> from a new Terminal and then connect using the Mongo shell. \u00a0This time instead of using port\u00a0<code>27019<\/code> you&#8217;ll be using port\u00a0<code>27017<\/code>.<\/p>\n<p>Once connected, execute the following commands to add the shards:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">sh.addShard(\"rs1\/172.17.0.3:27018\");\r\nsh.addShard(\"rs1\/172.17.0.4:27018\");<\/pre>\n<p>In the above, remember, we&#8217;re using the IP addresses of the shard nodes and the shard node port.<\/p>\n<p>With MongoDB&#8217;s sharding functions configured, we can now enable it for a particular database. \u00a0This can be any MongoDB database you&#8217;d like. \u00a0Enabling sharding can be done with the following:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">sh.enableSharding(\"example\");<\/pre>\n<p>We&#8217;re not done yet though. <span style=\"font-weight: 400\">In MongoDB, sharding options exist on a range that includes <a href=\"https:\/\/docs.mongodb.com\/manual\/core\/ranged-sharding\/#sharding-ranged\" target=\"_blank\" rel=\"noopener noreferrer\">Ranged Sharding<\/a> and <a href=\"https:\/\/docs.mongodb.com\/manual\/core\/hashed-sharding\/#sharding-hashed\" target=\"_blank\" rel=\"noopener noreferrer\">Hashed Sharding<\/a>.\u00a0 Determine your approach for how you\u2019ll shard data collections while keeping in mind <\/span>your goal is to get the data in your database spread as evenly as possible around this NoSQL cluster.<\/p>\n<p>Take the following command for example:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">sh.shardCollection(\"example.people\", { \"_id\": \"hashed\" });<\/pre>\n<p>The above command will create a shard key on\u00a0<code>_id<\/code> for the\u00a0<code>people<\/code> collection. Is it the best way to do things, maybe or maybe not, that is up to you to decide how you want to shard your data in MongoDB.<\/p>\n<p>If you ever want to check the shard distribution you could run:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">db.people.getShardDistribution();<\/pre>\n<p>As you can see from all the steps we went through, it was no small task in getting replication and sharding working in a cluster of MongoDB nodes. As you need to scale your cluster up and down, the task becomes even more cumbersome and it is something that frustrates companies.<\/p>\n<p>This is where Couchbase comes into play!<\/p>\n<h2>Creating a Multiple Node Couchbase Cluster<\/h2>\n<p>While Couchbase is a document database just like MongoDB, things are a little different in its architecture. Couchbase uses a peer-to-peer (P2P) design which eliminates the master-slave design. In addition, every node in a cluster has the same design, meaning it will have data, indexing, and query services available. This eliminates the need to create specialized replication or sharded clusters.<\/p>\n<p>So let&#8217;s take a look at creating a multiple node Couchbase cluster. Because we&#8217;re going to do everything locally, it makes sense to use Docker for this task.<\/p>\n<p>Execute the following commands from your Docker CLI:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">docker run -d -p 7091-7093:8091-8093 --name couchbase1 couchbase\r\ndocker run -d -p 8091-8093:8091-8093 --name couchbase2 couchbase\r\ndocker run -d -p 9091-9093:8091-8093 --name couchbase3 couchbase<\/pre>\n<p>The above commands will create three Couchbase Server containers mapping the container ports to a different set of host ports.<\/p>\n<p>Since this is Docker, each container will be a fresh installation of Couchbase. The goal of this guide is not to get up and running with Couchbase, so we won&#8217;t review how to go through each of the five configuration steps.<\/p>\n<p>There are multiple ways to establish a cluster in Couchbase, so we&#8217;ll see a few. Of the three containers, configure two of them as new clusters.<\/p>\n<p>The unconfigured node, let&#8217;s say\u00a0<code>couchbase1<\/code> will be the first one we add to the cluster. We are going to add it to the same cluster as the\u00a0<code>couchbase2<\/code> node. From your browser, navigate to\u00a0<strong>https:\/\/localhost:7091<\/strong> and choose to join a cluster.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3378 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/04\/couchbase-join-cluster-1.png\" alt=\"Join Couchbase Cluster\" width=\"1100\" height=\"519\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-1.png 1100w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-1-300x142.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-1-1024x483.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-1-768x362.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-1-20x9.png 20w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/p>\n<p>What matters here is IP address, administrative username and password of the other node, and the services you wish to be available.<\/p>\n<p>Since we&#8217;re using Docker, it is important we use the correct IP address of the\u00a0<code>couchbase2<\/code> node. \u00a0To find this IP address, execute the following command:<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">docker inspect couchbase2<\/pre>\n<p>Look for the IP address in the results. \u00a0It is very important that you do not try to use localhost since that is only the bound address, not the actual container address.<\/p>\n<p>After the\u00a0<code>couchbase1<\/code> node is added to the\u00a0<code>couchbase2<\/code> cluster, the cluster needs to be rebalanced.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3379 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/04\/couchbase-join-cluster-2.png\" alt=\"Join Couchbase Cluster\" width=\"1100\" height=\"235\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-2.png 1100w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-2-300x64.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-2-1024x219.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-2-768x164.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-2-20x4.png 20w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/p>\n<p>Rebalancing the cluster will distribute the Bucket data evenly across the cluster. A rebalance needs to happen every time you add or remove nodes from the cluster.<\/p>\n<p>You now have a two node cluster with replication and automatic sharding of data. Now let&#8217;s check out adding that third, already configured node, to the cluster.<\/p>\n<p>Since Couchbase is peer-to-peer, connect to either\u00a0<code>couchbase1<\/code> or\u00a0<code>couchbase2<\/code> and choose to add a new server to the cluster.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3380 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/04\/couchbase-join-cluster-3.png\" alt=\"Join Couchbase Cluster\" width=\"1100\" height=\"511\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-3.png 1100w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-3-300x139.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-3-1024x476.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-3-768x357.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-3-20x9.png 20w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/p>\n<p>You&#8217;ll need to enter the node information for\u00a0<code>couchbase3<\/code>, similar to how we did it previously. \u00a0Remember to use the appropriate container IP address.<\/p>\n<p>You just added a third node to the cluster. Don&#8217;t forget to rebalance to finish the process.<\/p>\n<p>There is a CLI way of adding nodes to a cluster or joining a cluster, but we won&#8217;t get into that as it isn&#8217;t any more difficult to what we already saw. Scaling Couchbase is a two step process regardless if you have three nodes or fifty nodes.<\/p>\n<p>If you&#8217;re really into Docker, I wrote a guide about automating this process for Couchbase in a <a href=\"https:\/\/www.thepolyglotdeveloper.com\/2017\/04\/using-couchbase-docker-deploying-containerized-nosql-cluster\/\" target=\"_blank\" rel=\"noopener noreferrer\">previous article<\/a> on the subject.<\/p>\n<h2>Conclusion<\/h2>\n<p>You just saw how much easier it is to create and scale a Couchbase Server cluster than it is with MongoDB. Extra complexity in your NoSQL database is a burden no operations or developer oriented person wants to deal with.<\/p>\n<p>If you&#8217;re interested in further comparing Couchbase against MongoDB, I&#8217;ve written a few other developer oriented articles on the subject. For example, if you&#8217;d like to transfer your data from MongoDB to Couchbase, you can <a href=\"https:\/\/www.couchbase.com\/blog\/import-mongodb-collection-data-couchbase-server-golang\/\" target=\"_blank\" rel=\"noopener noreferrer\">check out a Golang tutorial I wrote<\/a>, or if you&#8217;d like to <a href=\"https:\/\/www.couchbase.com\/blog\/migrate-mongodb-mongoose-couchbase-ottoman\/\" target=\"_blank\" rel=\"noopener noreferrer\">convert your Node.js RESTful API<\/a>, you can also find material on the subject.<\/p>\n<p>For more information on using Couchbase, check out the <a href=\"https:\/\/www.couchbase.com\/developers\/\" target=\"_blank\" rel=\"noopener noreferrer\">Couchbase Developer Portal<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I&#8217;m out at events and talking to NoSQL users and advocates, I often hear stories on why people have decided to start using Couchbase after having come from MongoDB. \u00a0Take, for example, an interview I did with Tom Coates [&hellip;]<\/p>\n","protected":false},"author":63,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,1816],"tags":[1300,1866,1309,1725,1562],"ppma_author":[9032],"class_list":["post-3373","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-couchbase-server","tag-cluster","tag-data","tag-mongodb","tag-nosql-database","tag-replication"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Simplifying Your NoSQL Cluster Design by Moving From MongoDB to Couchbase<\/title>\n<meta name=\"description\" content=\"Learn how much easier it is to create and maintain a NoSQL cluster with Couchbase than it is with MongoDB, and see why companies are switching.\" \/>\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\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simplify Your NoSQL Cluster by Moving From MongoDB Sharding to Couchbase Containers\" \/>\n<meta property=\"og:description\" content=\"Learn how much easier it is to create and maintain a NoSQL cluster with Couchbase than it is with MongoDB, and see why companies are switching.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/thepolyglotdeveloper\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-06T15:00:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T01:46:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"519\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nic Raboy, Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@nraboy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nic Raboy, Developer Advocate, Couchbase\" \/>\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\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/\"},\"author\":{\"name\":\"Nic Raboy, Developer Advocate, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/bb545ebe83bb2d12f91095811d0a72e1\"},\"headline\":\"Simplify Your NoSQL Cluster by Moving From MongoDB Sharding to Couchbase Containers\",\"datePublished\":\"2017-06-06T15:00:16+00:00\",\"dateModified\":\"2025-06-14T01:46:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/\"},\"wordCount\":1499,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"Cluster\",\"data\",\"mongodb\",\"NoSQL Database\",\"replication\"],\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/\",\"name\":\"Simplifying Your NoSQL Cluster Design by Moving From MongoDB to Couchbase\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2017-06-06T15:00:16+00:00\",\"dateModified\":\"2025-06-14T01:46:07+00:00\",\"description\":\"Learn how much easier it is to create and maintain a NoSQL cluster with Couchbase than it is with MongoDB, and see why companies are switching.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Simplify Your NoSQL Cluster by Moving From MongoDB Sharding to Couchbase Containers\"}]},{\"@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\/bb545ebe83bb2d12f91095811d0a72e1\",\"name\":\"Nic Raboy, Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8863514d8bed0cf6080f23db40e00354\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g\",\"caption\":\"Nic Raboy, Developer Advocate, Couchbase\"},\"description\":\"Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in Java, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Apache Cordova. Nic writes about his development experiences related to making web and mobile development easier to understand.\",\"sameAs\":[\"https:\/\/www.thepolyglotdeveloper.com\",\"https:\/\/www.facebook.com\/thepolyglotdeveloper\",\"https:\/\/x.com\/nraboy\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/nic-raboy-2\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Simplifying Your NoSQL Cluster Design by Moving From MongoDB to Couchbase","description":"Learn how much easier it is to create and maintain a NoSQL cluster with Couchbase than it is with MongoDB, and see why companies are switching.","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\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/","og_locale":"en_US","og_type":"article","og_title":"Simplify Your NoSQL Cluster by Moving From MongoDB Sharding to Couchbase Containers","og_description":"Learn how much easier it is to create and maintain a NoSQL cluster with Couchbase than it is with MongoDB, and see why companies are switching.","og_url":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/","og_site_name":"The Couchbase Blog","article_author":"https:\/\/www.facebook.com\/thepolyglotdeveloper","article_published_time":"2017-06-06T15:00:16+00:00","article_modified_time":"2025-06-14T01:46:07+00:00","og_image":[{"width":1100,"height":519,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/04\/couchbase-join-cluster-1.png","type":"image\/png"}],"author":"Nic Raboy, Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@nraboy","twitter_misc":{"Written by":"Nic Raboy, Developer Advocate, Couchbase","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/"},"author":{"name":"Nic Raboy, Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/bb545ebe83bb2d12f91095811d0a72e1"},"headline":"Simplify Your NoSQL Cluster by Moving From MongoDB Sharding to Couchbase Containers","datePublished":"2017-06-06T15:00:16+00:00","dateModified":"2025-06-14T01:46:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/"},"wordCount":1499,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["Cluster","data","mongodb","NoSQL Database","replication"],"articleSection":["Best Practices and Tutorials","Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/","url":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/","name":"Simplifying Your NoSQL Cluster Design by Moving From MongoDB to Couchbase","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2017-06-06T15:00:16+00:00","dateModified":"2025-06-14T01:46:07+00:00","description":"Learn how much easier it is to create and maintain a NoSQL cluster with Couchbase than it is with MongoDB, and see why companies are switching.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/simplifying-your-nosql-cluster-design-by-moving-from-mongodb-to-couchbase\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Simplify Your NoSQL Cluster by Moving From MongoDB Sharding to Couchbase Containers"}]},{"@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\/bb545ebe83bb2d12f91095811d0a72e1","name":"Nic Raboy, Developer Advocate, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8863514d8bed0cf6080f23db40e00354","url":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","caption":"Nic Raboy, Developer Advocate, Couchbase"},"description":"Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in Java, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Apache Cordova. Nic writes about his development experiences related to making web and mobile development easier to understand.","sameAs":["https:\/\/www.thepolyglotdeveloper.com","https:\/\/www.facebook.com\/thepolyglotdeveloper","https:\/\/x.com\/nraboy"],"url":"https:\/\/www.couchbase.com\/blog\/author\/nic-raboy-2\/"}]}},"authors":[{"term_id":9032,"user_id":63,"is_guest":0,"slug":"nic-raboy-2","display_name":"Nic Raboy, Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","author_category":"","last_name":"Raboy","first_name":"Nic","job_title":"","user_url":"https:\/\/www.thepolyglotdeveloper.com","description":"Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in Java, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Apache Cordova. Nic writes about his development experiences related to making web and mobile development easier to understand."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/3373","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\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=3373"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/3373\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=3373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=3373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=3373"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=3373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}