Wednesday, July 8, 2020

Concept of Sharding in MongoDB

Concept of Sharding in MongoDB Concept of Sharding in MongoDB Back Home Categories Online Courses Mock Interviews Webinars NEW Community Write for Us Categories Artificial Intelligence AI vs Machine Learning vs Deep LearningMachine Learning AlgorithmsArtificial Intelligence TutorialWhat is Deep LearningDeep Learning TutorialInstall TensorFlowDeep Learning with PythonBackpropagationTensorFlow TutorialConvolutional Neural Network TutorialVIEW ALL BI and Visualization What is TableauTableau TutorialTableau Interview QuestionsWhat is InformaticaInformatica Interview QuestionsPower BI TutorialPower BI Interview QuestionsOLTP vs OLAPQlikView TutorialAdvanced Excel Formulas TutorialVIEW ALL Big Data What is HadoopHadoop ArchitectureHadoop TutorialHadoop Interview QuestionsHadoop EcosystemData Science vs Big Data vs Data AnalyticsWhat is Big DataMapReduce TutorialPig TutorialSpark TutorialSpark Interview QuestionsBig Data TutorialHive TutorialVIEW ALL Blockchain Blockchain TutorialWhat is BlockchainHyperledger FabricWhat Is EthereumEthereum TutorialB lockchain ApplicationsSolidity TutorialBlockchain ProgrammingHow Blockchain WorksVIEW ALL Cloud Computing What is AWSAWS TutorialAWS CertificationAzure Interview QuestionsAzure TutorialWhat Is Cloud ComputingWhat Is SalesforceIoT TutorialSalesforce TutorialSalesforce Interview QuestionsVIEW ALL Cyber Security Cloud SecurityWhat is CryptographyNmap TutorialSQL Injection AttacksHow To Install Kali LinuxHow to become an Ethical Hacker?Footprinting in Ethical HackingNetwork Scanning for Ethical HackingARP SpoofingApplication SecurityVIEW ALL Data Science Python Pandas TutorialWhat is Machine LearningMachine Learning TutorialMachine Learning ProjectsMachine Learning Interview QuestionsWhat Is Data ScienceSAS TutorialR TutorialData Science ProjectsHow to become a data scientistData Science Interview QuestionsData Scientist SalaryVIEW ALL Data Warehousing and ETL What is Data WarehouseDimension Table in Data WarehousingData Warehousing Interview QuestionsData warehouse architectureTalend T utorialTalend ETL ToolTalend Interview QuestionsFact Table and its TypesInformatica TransformationsInformatica TutorialVIEW ALL Databases What is MySQLMySQL Data TypesSQL JoinsSQL Data TypesWhat is MongoDBMongoDB Interview QuestionsMySQL TutorialSQL Interview QuestionsSQL CommandsMySQL Interview QuestionsVIEW ALL DevOps What is DevOpsDevOps vs AgileDevOps ToolsDevOps TutorialHow To Become A DevOps EngineerDevOps Interview QuestionsWhat Is DockerDocker TutorialDocker Interview QuestionsWhat Is ChefWhat Is KubernetesKubernetes TutorialVIEW ALL Front End Web Development What is JavaScript â€" All You Need To Know About JavaScriptJavaScript TutorialJavaScript Interview QuestionsJavaScript FrameworksAngular TutorialAngular Interview QuestionsWhat is REST API?React TutorialReact vs AngularjQuery TutorialNode TutorialReact Interview QuestionsVIEW ALL Mobile Development Android TutorialAndroid Interview QuestionsAndroid ArchitectureAndroid SQLite DatabaseProgramming When the data is so larg e, it cant be stored and scaled in a single machine. It can be too expensive to store exponentially growing data in a single machine. Moreover, as the size of data increases, data storage in a single machine may not provide an acceptable read and write throughput.What is Sharding?Sharding is the process of storing data records across multiple machines. It provides support to meet the demands of data growth. It is not replication of data, but amassing different data from different machines. Sharding allows horizontal scaling of data stored in multiple shards. With Sharding, we can add more machines to meet the demands of growing data and the demands of read and write operations. The more machines you add, the more read and write operations your database can support.Why do we need Sharding?In replication, all writes go to master node. The master node is latency sensitive.Each of the single replica set has the limitation of 12 nodesThe memory cant be large enough when the active data s et is large enough. Theres a limit up to which main memory can be increased.The local disk is not big enough to store the large amount of data.Verticle scaling is too expensive, e.g. RDBMSSharding ArchitectureThere are number of replica sets in a MongoDB cluster, each of which contains 3 or more mongod nodes. There are multiple shards within the clusters. Mongos communicate with each of the Shards, and the App server in turn communicates with the query router, Mongos. This way the data is partitioned.For example, if there are 6 million employee documents, they cant be stored in a single machine as there is a limit to its storage capacity, and read and write throughput. In such a case, Sharding helps in storing and managing data across multiple shards. If data is to be horizontally divided across the 6 shards, based on the employee id of each employee, every shard will have 1 million employee ids. This way, the large set of data can be easily scaled.Got a question for us? Mention the m in the comments section and we will get back to you.Related Posts:MongoDB: The Database for Big Data ProcessingReal World Use Cases of MongoDBLearn MongoDBRecommended videos for you Introduction to MongoDB Watch Now Build Application With MongoDB Watch NowRecommended blogs for you Top 65 SQL Interview Questions You Must Prepare In 2020 Read Article MongoDB: The Database for Big Data Processing Read Article Top Apache Cassandra Interview Questions You Must Prepare In 2020 Read Article SQL Views: How to work with Views in SQL? Read Article SQL Tutorial : One Stop Solution to Learn SQL Read Article What are Triggers in SQL and how to implement them? Read Article CREATE TABLE in SQL Everything You Need To Know About Creating Tables in SQL Read Article Top 30 SQL Query Interview Questions You Must Practice In 2019 Read Article MySQL Workbench Tutorial A Comprehensive Guide To The RDBMS Tool Read Article What is the use of DECODE function in SQL? Read Article SSIS Tutorial For Beginne rs: Why, What and How? Read Article What is the Average Salary of a SQL Developer? Read Article Everything You Need to Know About LIKE Operator in SQL Read Article How To Use CASE Statement in MySQL? Read Article How To Install MySQL on Windows 10? Your One Stop Solution To Install MySQL Read Article Top 5 Reasons to Learn Cassandra Decoded! Read Article SQL Pivot â€" Know how to convert rows to columns Read Article Growing Significance of MongoDB in Data Science Field Read Article Learn About Concatenate In SQL With Examples Read Article Understanding MongoDB Architecture Read Article Comments 0 Comments Trending Courses in Databases SQL Essentials Training Certification6k Enrolled LearnersWeekend/WeekdaySelf Paced Reviews 5 (2400)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.