惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
博客园_首页
H
Help Net Security
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
GbyAI
GbyAI
Scott Helme
Scott Helme
D
Docker
Hacker News: Ask HN
Hacker News: Ask HN
P
Privacy & Cybersecurity Law Blog
Jina AI
Jina AI
雷峰网
雷峰网
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
G
GRAHAM CLULEY
C
Cisco Blogs
The Hacker News
The Hacker News
F
Full Disclosure
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
Recent Announcements
Recent Announcements
G
Google Developers Blog
量子位
K
Kaspersky official blog
Cisco Talos Blog
Cisco Talos Blog
The Cloudflare Blog
A
About on SuperTechFans
C
Cybersecurity and Infrastructure Security Agency CISA
Last Week in AI
Last Week in AI
博客园 - 三生石上(FineUI控件)
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
T
Tenable Blog
P
Palo Alto Networks Blog
H
Heimdal Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Schneier on Security
Schneier on Security
The Register - Security
The Register - Security
F
Fortinet All Blogs
Stack Overflow Blog
Stack Overflow Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Blog of Author Tim Ferriss
N
News and Events Feed by Topic
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
V
V2EX
爱范儿
爱范儿

博客园 - 風語者·疾風

转载:ZooKeeper Programmer's Guide(中文翻译) Python【map、reduce、filter】内置函数使用说明(转载) Python使用基础 Redis Sentinel:集群Failover解决方案(转载) Sentinel-Redis高可用方案(二):主从切换 Sentinel-Redis高可用方案(一):主从复制 照片方案 8天学通MongoDB(实际操作版)——第一天 基础入门 构建Ubuntu Server试验环境 单元测试培训系列:(二)单元测试与Visual Studio My Record Series: (1.3) Windows Phone 7 Application Events My Record Series: (1.2) Windows Phone 7 Launchers and Choosers My Record Series: (1.1) Windows Phone 7.1 Development Environment 结合测试驱动TDD实施单元测试UnitTest 架构评审表(Architecture & Design Review Check List) 单元测试培训系列:(三)可测试性(Testability)与重构Refactoring 单元测试培训系列:(一)单元测试概念以及必要性 .NET Mocking Framework对比 Ajax-Enabled WCF Service中如何获取到Response
8天学通MongoDB(实际操作版)——第九天 构建学习型部署环境
風語者·疾風 · 2012-05-04 · via 博客园 - 風語者·疾風

根据此前的学习,已经可以了解到MongoDB主要的几种服务器角色:

  1. Mongos,这是MongoDB群集的入口服务器,主要承担数据路由任务。它会根据配置的“片键”将数据分发到自己管理的MongoDB群集中;
  2. ConfigServer,该服务器角色负责管理Mongos数据分片的依据,数据和片的对应关系以及相应的配置信息(需要注意的是ConfigServer的个数必须为1或3)
  3. ShardServer,独立的分片Mongod服务器,并入到Mongos下统一管理,存储分片的数据;
  4. ShardServer(repSet),副本集中的分片服务器,每个副本集中至少需要两个以上的ShardServer;
  5. ArbiterServer,副本集中的仲裁服务器,每个副本集中至少需要一个ArbiterServer;

参见下图,我们需要部署两个Mongos入口,3个ConfigServer,一个独立的ShardServer和一个RepSet(包含两个ShardServer和一个ArbiterServer),一共需要9个mongod实例。

决定把这8个实例分别部署到3台电脑上(一台物理主机,两台虚拟机)

Physical Server(192.168.111.11)

  • ConfigServer-I(D盘)
    mongod --configsvr --dbpath=d:\mongodb\db --port 2000
  • ShardServer(C盘)
    mongod –dbpath=c:\mongodb\db –port 4000
  • ArbiterServer(E盘)
    mongod --dbpath=e:\mongodb\db –port 4004 –replSet superlab/192.168.111.111:4000

Virtual Server-I(192.168.111.111)

  • ConfigServer-II(D盘)
    mongod --configsvr --dbpath=d:\mongodb\db --port 2000
  • Mongos(C盘)
    mongos --port 8848 --configdb=192.168.111.111:2000,192.168.111.222:2000,192.168.111.11:2000(C盘)
  • ShardServer(repSet) (E盘,磁盘空间需要大于2G)
    mongod --dbpath=e:\mongodb\db --port 4000 --replSet HALab/192.168.111.222:4000

Virtual Server-II(192.168.111.222)

  • ConfigServer-III(D盘)
    mongod --configsvr --dbpath=d:\mongodb\db --port 2000
  • Mongos(C盘)
    mongos --port 8848 --configdb=192.168.111.111:2000,192.168.111.222:2000,192.168.111.11:2000(C盘)
  • ShardServer(repSet) (E盘,磁盘空间需要大于2G)
    mongod --dbpath=e:\mongodb\db --port 4000 --replSet HALab/192.168.111.111:4000