Mongo DB Sharding
Database Sharding is considered to be the horizontal partitioning of a database or the search engine where each partition is called as a Shard. This is a process of compressing the data collections by splitting the database instances across multiple databases. This in turn fastens the speed of MongoDB CRUD operations. MongoDB creates Shard keys which distribute the data across multiple shards.

Purpose of database sharding
Due to following reasons database sharding holds an important place in MongoDB –
- Scaling out to multiple nodes
- Easy to add new machines
- Automatic balance of load
- Zero downtime
- Automatic failure recovery
Process of creating database shard
Follow the given steps to create a database shard-
- Create a batch file with the name bat at the root of MongoDB's bin folder.
- Write following lines on the batch file:
mkdir"data/localhost10000"
mongod –rest –shardsvr –port 10000 –dbpath data/localhost10000 –logpath data/localhost10000/log.txt
PAUSE
- Create another batch file with the name bat at the root of MongoDB's bin folder.
- Write following lines on the batch file:
mkdir "data/localhost10001"
mongod –rest –shardsvr –port 10001 –dbpath data/localhost10001 –logpath data/localhost10001/log.txt
PAUSE
- Run RunServer10000.bat
- Run RunServer10001.bat
Mongo DB Sharding的更多相关文章
- mongo DB for C#
(1)Download the MongoDB C#驱动. http://www.nuget.org/packages/mongocsharpdriver/. (2) Add Reference to ...
- Mongo DB 2.6 需要知道的一些自身限定
在现实的世界中,任何事情都有两面性,在程序的世界中,亦然! 我们不论是在使用一门新的语言,还是一门新的技术,在了解它有多么的让人兴奋,让人轻松,多么的优秀之余,还是很有必要了解一些他的局限性,方便你在 ...
- Mongo DB Study: first face with mongo DB
Mongo DB Study: first face with mongo DB 1. study methods: 1. Translate: I am the mongo DB organiz ...
- mongo db 分享 ppt
在公司内部的mongo db的ppt.初步进阶 http://files.cnblogs.com/files/yuhan-TB/mongoDB.pptx
- Mongo DB 安装-及分布式集群部署(初稿)
一.安装步骤, 1, 下载最新的Mongo DB数据库:http://www.mongodb.org/downloads?_ga=1.44426535.2020731121.1421844747\ 下 ...
- mongo db 使用方法
1 下载 mogodb http://www.mongodb.org/display/DOCS/Downloads 2 打开服务 我安装在e盘下了 可以指定数据文件位置 到 E:\mongoDB\mo ...
- mysql 和 mongo db 语法对比
本文描述了MySQL中的常用SQL语句在MongoDB中的写法,如果你长期使用MySQL而对MongoDB跃跃欲试,这篇简单的文章可以帮助你更快的进入角色.查询:MySQL:SELECT * FROM ...
- Mongo DB命令简介
引言 最近在学习MongoDB 总结了一些命令及常用的东西做整理 常用目录文件介绍 mongod 数据库部署命令 mongo 连接mongodb数据库而使用的命令 mongoimport 导入 ...
- Java从入门到精通——数据库篇Mongo DB GridFS文件系统
一.概述 GridFS是MongoDB的一种存储机制,用来存储大型二进制文件. 优点: 1.使用GridFS能够简化你的栈.如果已经在使用MongoDB,那么可以使用GridFS来代替独立的文件 ...
随机推荐
- HDU 4768 Flyer (2013长春网络赛1010题,二分)
Flyer Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi ...
- 爬虫IP被禁的简单解决方法
爬虫以前听上去好厉害好神秘的样子,用好了可以成就像Google.百度这样的索索引擎,用不好可以凭借不恰当的高并发分分钟崩掉一个小型网站.写到这里想到12306每年扛住的并发请求量,觉得好牛逼. 爬虫和 ...
- [Winform]js与webbrowser交互
摘要 目前项目中采用的方式是内嵌浏览器的方式,打开本地或者互联网上的h5页面.在开发之前做了一下调研.目前常用的在C#封装的浏览器内核中,Chromium 内核封装有Xilium.Cefglue.Ce ...
- 查看内核页表kernel_page_tables (aarch32)
作者 彭东林 pengdonglin137@163.com 平台 Linux-4.10.17 Qemu + vexpress-ca9 概述 通过配置内核,会在/sys/kernel/deb ...
- 交叉编译gdb和gdbserver
从http://ftp.gnu.org/gnu/gdb/下载最新的gdb,我下载的是gdb-8.0. 编译aarch32(>armv5): #!/bin/bash export CC=arm-n ...
- 关于电商ERP的想法
原文地址: http://www.chinaodoo.net/thread-465-1-1.html 试用了下odoo的淘宝订单处理模块,从整个业务流程上已经打通,如果要求不是很高的话,现有的功能基本 ...
- String Matching(poj1580)
/*String Matching Description It's easy to tell if two words are identical - just check the letters. ...
- 打印mac地址
转自:http://blog.chinaunix.net/uid-546544-id-2096102.html 有这样两个宏可以方便地打印mac地址:#define MAC_FMT "%02 ...
- UITableViewCell图片视差效果
UITableViewCell图片视差效果 效果 源码 https://github.com/YouXianMing/Animations 细节 OffsetImageCell.m OffsetCel ...
- 如何在Windows下运行linux shell脚本
在工作中情况会在碰到linux下进行执行shell的脚本,而就会使用shell的脚本,但经常使用的Windows的系统,而想在Windows电脑中进行直接shell的脚本,而不用再进行学习其它的脚本语 ...