MONGODB 讀書摘要
If you are starting a brand-new set, you can send the configuration to any member in
the set. If you are starting with data on one of the members, you must send the configuration
to the member with data. You cannot initiate a set with data on more than one
member.
如果RS是全新的,無任何資料的,那麼初始化叢集可以在任意一臺機器上,否則應該在存在資料的節點上進行初始化。你不能夠初始化RS,在2個節點都存在資料的時候。
Note that, in both of the use cases above, you need at most one arbiter. You do not need
an arbiter if you have an odd number of nodes. A common misconception seems to be
that you should add extra arbiters “just in case.” However, it doesn’t help elections go
any faster or provide any data safety to add extra arbiters.
Suppose you have a three members set. Two members are required to elect a primary.
If you add an arbiter, you’ll have a four member set, so three members will be required
to choose a primary. Thus, your set is potentially less stable: instead of requiring 67%
of your set to be up, you’re now requiring 75%.
Having extra members can also make elections take longer. If you have an even number
of nodes because you added an arbiter, your arbiters can cause ties, not prevent them.
最多隻需要一個仲裁者,如果節點數是奇數,那就不需要仲裁者。一種錯誤的理解是,為了以防萬一,總是應該新增額外的仲裁者。
假設有3個節點的成員的RS,需要2個成員才能組成大多數,才能選舉為主節點,如果這時新增了一個仲裁者,RS裡就4個成員了,要有3個成員才能組成大多數。因此RS的穩定性降低了。
新增額外成員也會導致選舉耗時變長,由於新增了仲裁者,現在RS一共有偶數個成員,這樣就可能出現成員票數相同的情況。仲裁者的目的應該是避免出現平票,而不是導致出現平票。
the set. If you are starting with data on one of the members, you must send the configuration
to the member with data. You cannot initiate a set with data on more than one
member.
如果RS是全新的,無任何資料的,那麼初始化叢集可以在任意一臺機器上,否則應該在存在資料的節點上進行初始化。你不能夠初始化RS,在2個節點都存在資料的時候。
Note that, in both of the use cases above, you need at most one arbiter. You do not need
an arbiter if you have an odd number of nodes. A common misconception seems to be
that you should add extra arbiters “just in case.” However, it doesn’t help elections go
any faster or provide any data safety to add extra arbiters.
Suppose you have a three members set. Two members are required to elect a primary.
If you add an arbiter, you’ll have a four member set, so three members will be required
to choose a primary. Thus, your set is potentially less stable: instead of requiring 67%
of your set to be up, you’re now requiring 75%.
Having extra members can also make elections take longer. If you have an even number
of nodes because you added an arbiter, your arbiters can cause ties, not prevent them.
最多隻需要一個仲裁者,如果節點數是奇數,那就不需要仲裁者。一種錯誤的理解是,為了以防萬一,總是應該新增額外的仲裁者。
假設有3個節點的成員的RS,需要2個成員才能組成大多數,才能選舉為主節點,如果這時新增了一個仲裁者,RS裡就4個成員了,要有3個成員才能組成大多數。因此RS的穩定性降低了。
新增額外成員也會導致選舉耗時變長,由於新增了仲裁者,現在RS一共有偶數個成員,這樣就可能出現成員票數相同的情況。仲裁者的目的應該是避免出現平票,而不是導致出現平票。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22034023/viewspace-1162475/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- VLDB and Partitioning Guide 讀書摘要GUIIDE
- MONGODB 讀書筆記MongoDB筆記
- 《小圈子•大社交》——讀書筆記及摘要筆記
- 敏捷軟體開發:原則、模式與實踐讀書摘要敏捷模式
- 專利說明書摘要
- 《高效能javascript》閱讀摘要JavaScript
- 《HTTP/2 基礎教程》 閱讀摘要HTTP
- MongoDB閱讀精要MongoDB
- 《刻意練習》+《刻意學習》閱讀摘要
- 《讀書與做人》讀書筆記筆記
- 《單核工作法圖解》閱讀摘要單核圖解
- 深度學習聖經“花書”各章摘要與筆記整理深度學習筆記
- mongodb三本好書推薦MongoDB
- mongodb的讀寫分離MongoDB
- Python 潮流週刊第 41 期(摘要),贈書5本Python
- Python 潮流週刊第 46 期(摘要)+ 贈書 7 本Python
- 《JavaScript設計模式與開發實踐》閱讀摘要JavaScript設計模式
- [TEAP早期試讀]《MongoDB in Action》——為什麼選擇MongoDB?MongoDB
- 《書都不會讀,你還想要成功》讀書筆記筆記
- 《如何有效閱讀一本書》讀書筆記筆記
- 讀書系統
- 讀書經驗
- 讀書日誌
- 讀書筆記...筆記
- 讀書筆記筆記
- 世界讀書日 | 機器學習必讀書籍一覽表(附閱讀地址)機器學習
- 論文太多讀不完?AI化身閱讀小助手,可一鍵生成文章摘要!AI
- 讀書打卡 | 參與沸點#讀書打卡#活動來拿技術書籍?
- 獲得 MongoDB for Node.js Developers 證書MongoDBNode.jsDeveloper
- 【Mongodb】 Replica set 的讀寫分離MongoDB
- 《快速閱讀術》讀書筆記筆記
- 《如何閱讀一本書》讀書筆記完整版筆記
- Cucumber讀書筆記筆記
- 散文讀書筆記筆記
- HTTP 讀書筆記HTTP筆記
- CoreJava讀書筆記-------Java筆記
- flask讀書筆記Flask筆記
- Vue讀書筆記Vue筆記