Skip to Content
MongoDB权威指南(第3版)
book

MongoDB权威指南(第3版)

by Shannon Bradshaw, Eoin Brazil, Kristina Chodorow
November 2021
Intermediate to advanced
410 pages
12h 1m
Chinese
Posts & Telecom Press
Content preview from MongoDB权威指南(第3版)
378
24
即使没有使用分片并且应用程序只使用了少量的连接,也最好将硬连接和软连接限制增加
到至少
4096
个。这可以关闭
MongoDB
的相关警告,并在出现问题时给你一些喘息空间。
24.4
 网络配置
本节会介绍哪些服务器之间应该建立连接。通常情况下,出于网络安全和敏感性的考虑,
你可能希望限制
MongoDB
服务器的网络连接
。注意,多服务器
MongoDB
的部署应该能
够处理网络分区或断开的情况,但不建议将其作为通用的部署策略。
对于单机服务器,客户端必须能够连接到
mongod
副本集成员必须能够与每个其他成员都建立连接。客户端必须能够连接到所有非隐藏、非
仲裁的成员。根据网络配置,成员也可以尝试连接到自己,因此应该允许
mongod
建立到
自身的连接。
分片要稍微复杂一些,涉及
4
个组件
mongos
服务器、分片、配置服务器和客户端。连
接要求可以概括为以下
3
点:
客户端必须能够连接到
mongos
mongos
必须能够连接到分片和配置服务器;
分片必须能够连接到其他分片和配置服务器。
完整的连接图如表
24-1
所示。
24-1:分片连接
连接 源服务器类型
目标服务器类型
mongos
分片 配置服务器 客户端
mongos
不需要 不需要 不需要 需要
分片 需要 需要 不需要 不推荐
配置服务器 需要 需要 不需要 不推荐
客户端 不需要 不需要 不需要
MongoDB
无关
该表中有
3
种可能的值。“需要”表示要让分片正常工作,这两个组件之间的连接是必需
的。当
MongoDB
遇到网络问题导致这些连接中断时 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

大数据项目管理:从规划到实现

大数据项目管理:从规划到实现

Ted Malaska, Jonathan Seidman
Go程序设计语言

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉
Spark快速大数据分析(第2版)

Spark快速大数据分析(第2版)

Jules S. Damji, Brooke Wenig, Tathagata Das, Denny Lee
Kafka权威指南(第2版)

Kafka权威指南(第2版)

Gwen Shapira, Todd Palino, Rajini Sivaram, Krit Petty

Publisher Resources

ISBN: 9787115576538