<br />
<b>Warning</b>:  Undefined array key "global_protection_id" in <b>/home/wikitechy/public_html/interview-questions/wp-content/plugins/content-protector/inc/class-ps-rest-handler.php</b> on line <b>51</b><br />
{"id":4125,"date":"2022-04-16T06:00:37","date_gmt":"2022-04-16T06:00:37","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=4125"},"modified":"2022-04-16T06:00:37","modified_gmt":"2022-04-16T06:00:37","slug":"what-are-the-elements-of-the-sharded-cluster","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/","title":{"rendered":"What are the elements of the Sharded Cluster ?"},"content":{"rendered":"<ul>\n<li>Sharding is used to create a cluster of MongoDB instances consisting of at least three servers.<\/li>\n<li>There are three types of elements in Sharded Cluster.<\/li>\n<\/ul>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Shards<\/li>\n<li>Query Router<\/li>\n<li>Config server<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-4126 size-full\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png\" alt=\"Elements of sharded cluster\" width=\"1218\" height=\"857\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png 1218w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster-300x211.png 300w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster-1024x720.png 1024w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster-768x540.png 768w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster-390x274.png 390w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster-820x577.png 820w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster-1180x830.png 1180w\" sizes=\"(max-width: 1218px) 100vw, 1218px\" \/><\/p>\n<h4 id=\"shards\">Shards :<\/h4>\n<ul>\n<li>It is a single MongoDB instance that holds a subset of the sharded data.<\/li>\n<li>It can be deployed as replica sets to provide redundancy and increase availability.<\/li>\n<li>The combination of multiple shards creates a complete data set.<\/li>\n<\/ul>\n<h4 id=\"query-router\">Query router :<\/h4>\n<ul>\n<li>Query router acts as a Mongos providing a stable interface between the application and the sharded cluster.<\/li>\n<li>In this MongoDB instance is responsible for routing the client requests to the correct shard.<\/li>\n<\/ul>\n<h4 id=\"config-server\">Config Server :<\/h4>\n<ul>\n<li>Config Server becomes to store the metadata (Data about the data) and the configuration settings for the whole cluster.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sharding is used to create a cluster of MongoDB instances consisting of at least three servers. There are three types of elements in Sharded Cluster. Shards Query Router Config server Shards : It is a single MongoDB instance that holds a subset of the sharded data. It can be deployed as replica sets to provide [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"passster_activate_protection":false,"passster_protect_child_pages":"","passster_protection_type":"password","passster_password":"","passster_activate_overwrite_defaults":"","passster_headline":"","passster_instruction":"","passster_placeholder":"","passster_button":"","passster_id":"","passster_activate_misc_settings":"","passster_redirect_url":"","passster_hide":"no","passster_area_shortcode":"","gtb_hide_title":false,"gtb_wrap_title":false,"gtb_class_title":"","gtb_remove_headerfooter":false,"footnotes":""},"categories":[16831],"tags":[17000,16998,17017,17015,17013,17002,17016,17001,16997,17004,17005,17014,17018,17011,16996,17010,17007,17006,17012,17008,17009,17019,17020,16999,17003],"class_list":["post-4125","post","type-post","status-publish","format-standard","hentry","category-mongodb","tag-deploy-sharded-cluster-using-hashed-sharding","tag-how-to-use-sharding-in-mongodb","tag-mongodb-backup-sharded-cluster","tag-mongodb-connect-to-sharded-cluster","tag-mongodb-sharded-cluster","tag-mongodb-sharded-cluster-architecture","tag-mongodb-sharded-cluster-kubernetes","tag-mongodb-sharded-cluster-setup","tag-mongodb-sharding","tag-mongodb-sharding-example","tag-mongodb-sharding-vs-partitioning","tag-mongodump-sharded-cluster","tag-mongorestore-sharded-cluster","tag-sharded-cluster-backup","tag-sharded-cluster-components","tag-sharded-cluster-deploy","tag-sharded-cluster-meaning","tag-sharded-cluster-mongodb","tag-sharded-cluster-mongodb-backup","tag-sharded-cluster-mongodb-tutorial","tag-sharded-cluster-replica-set","tag-sharded-redis-cluster","tag-sharded-replicated-cluster","tag-sharding-data-collections-with-mongodb","tag-types-of-sharding-in-mongodb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What are the elements of the Sharded Cluster ? - Mongodb<\/title>\n<meta name=\"description\" content=\"What are the elements of the Sharded Cluster ? - Mongodb - Sharding is used to create a cluster of MongoDB instances consisting of at least three servers.\" \/>\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.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What are the elements of the Sharded Cluster ? - Mongodb\" \/>\n<meta property=\"og:description\" content=\"What are the elements of the Sharded Cluster ? - Mongodb - Sharding is used to create a cluster of MongoDB instances consisting of at least three servers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-16T06:00:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png\" \/>\n<meta name=\"author\" content=\"webmaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webmaster\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/\",\"name\":\"What are the elements of the Sharded Cluster ? - Mongodb\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png\",\"datePublished\":\"2022-04-16T06:00:37+00:00\",\"dateModified\":\"2022-04-16T06:00:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\"},\"description\":\"What are the elements of the Sharded Cluster ? - Mongodb - Sharding is used to create a cluster of MongoDB instances consisting of at least three servers.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/#primaryimage\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png\",\"contentUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png\",\"width\":1218,\"height\":857,\"caption\":\"Elements of sharded cluster\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\",\"name\":\"webmaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"caption\":\"webmaster\"},\"sameAs\":[\"https:\/\/www.wikitechy.com\/interview-questions\"],\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What are the elements of the Sharded Cluster ? - Mongodb","description":"What are the elements of the Sharded Cluster ? - Mongodb - Sharding is used to create a cluster of MongoDB instances consisting of at least three servers.","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.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/","og_locale":"en_US","og_type":"article","og_title":"What are the elements of the Sharded Cluster ? - Mongodb","og_description":"What are the elements of the Sharded Cluster ? - Mongodb - Sharding is used to create a cluster of MongoDB instances consisting of at least three servers.","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/","og_site_name":"Wikitechy","article_published_time":"2022-04-16T06:00:37+00:00","og_image":[{"url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png"}],"author":"webmaster","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webmaster","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/","name":"What are the elements of the Sharded Cluster ? - Mongodb","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png","datePublished":"2022-04-16T06:00:37+00:00","dateModified":"2022-04-16T06:00:37+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"description":"What are the elements of the Sharded Cluster ? - Mongodb - Sharding is used to create a cluster of MongoDB instances consisting of at least three servers.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-elements-of-the-sharded-cluster\/#primaryimage","url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png","contentUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/elelments-of-sharded-cluster.png","width":1218,"height":857,"caption":"Elements of sharded cluster"},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4","name":"webmaster","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","caption":"webmaster"},"sameAs":["https:\/\/www.wikitechy.com\/interview-questions"],"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=4125"}],"version-history":[{"count":1,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4125\/revisions"}],"predecessor-version":[{"id":4127,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4125\/revisions\/4127"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=4125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=4125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=4125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}