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来代替独立的文件 ...
随机推荐
- CentOS 7解压安装PHP5.6.13
自动化脚本: https://github.com/easonjim/centos-shell/blob/master/php/install-php_5.6.13.sh
- spring cloud 学习(5) - config server
分布式环境下的统一配置框架,已经有不少了,比如百度的disconf,阿里的diamand.今天来看下spring cloud对应的解决方案: 如上图,从架构上就可以看出与disconf之类的有很大不同 ...
- 改进架构,实现动态数据源,减少java维护
怎样不用写java代码来完毕开发? 对于大部分的产品和项目来说.页面变化是很头痛的事情.每次小功能上线,新客户到来,都须要进行定制改造,不断的开发维护.每次开发一方面要修改页面,一方面要修改serve ...
- delphi SPCOMM的一些用法注意
使用串口SPCOMM接收数据的时候0x11和0x13无法接受,从时间间隔上看来可以接收,但是无法显示.网上查错误得: --------------------------------------- ...
- 执行nova-manage db sync时出错,提示’Specified key was too long; max key length is 1000 bytes’
执行nova-manage db sync时出错: 2012-03-24 14:07:01 CRITICAL nova [-] (OperationalError) (1071, ‘Specified ...
- c#开发activex注册问题
最近使用c#开发activex,遇到一个问题,生成的dll文件在本地可以嵌入到web里面,但是到其他机器上就会出现activex无法加载的情况,页面里面出现一个红色的X.mfc开发的activex是使 ...
- ASP.NET MVC异步验证是如何工作的02,异步验证表单元素的创建
在上一篇"ASP.NET MVC异步验证是如何工作的01,jQuery的验证方式.错误信息提示.validate方法的背后"中,了解了jQuery如何验证,如何显示错误信息,本篇要 ...
- AutoMapper在MVC中的运用06-一次性定义映射、复杂类型属性映射
本篇AutoMapper使用场景: ※ 当源和目标具有同名的复杂类型属性.集合类型属性,这2种属性对应的类间也需建立映射 ※ 一次性定义好源和目标的所有映射 ※ 一次性定义好源和目标的所有映射,目标中 ...
- delphi udp文件传输
客户端: unit UnitClient; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Contr ...
- Delphi加载驱动
program Project2; uses Windows, Native, JwaWinType, Unit_Driver; function Is2KXp(): Boolean; var OSV ...