-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Cygni replica set intro #931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
======================== | ||
Replica Set Introduction | ||
======================== | ||
|
||
.. default-domain:: mongodb | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. paragraph taking "replication" -> "replica set" |
||
A :term:`replica set` is a group of :program:`mongod` instances | ||
configured as a master that receives writes and one or more slaves that | ||
replicate data. Replica sets provide automatic failover in the event of | ||
an outage. If a master becomes unavailable, the replica set | ||
automatically promotes a slave. | ||
|
||
Replica sets provide strict consistency for reads | ||
from the master, , and allow you to | ||
spread database reads across machines, providing increased read | ||
capacity, as described in :doc:`/core/read-preference`. Replica sets | ||
allow asynchronous replication of writes, as described in | ||
:ref:`write-concern`. Most production deployments use replication. | ||
|
||
Replication | ||
----------- | ||
|
||
A replica set consists of at least three :program:`mongod` instances: a | ||
:term:`primary` and either two :term:`secondaries <secondary>` or a | ||
secondary and an :term:`arbiter`. The primary accepts all writes for the | ||
set. All members accept reads. Secondaries replicate from the primary by | ||
asynchronously reading and applying the writes. | ||
|
||
MongoDB applies database operations on the primary and records the | ||
operations in the primary's :term:`oplog`. Each replica set member | ||
maintains a copy of the oplog, which allow the member to apply | ||
replicated operations asynchronously. | ||
|
||
Failover and Recovery | ||
--------------------- | ||
|
||
If a primary becomes unavailable, MongoDB can automatically failover and | ||
promote one of the secondaries as the new primary, automatically without | ||
administration intervention. The data on the new primary is now the most | ||
current in the set. All members resynchronize when connecting to the new | ||
primary. If the original primary comes back up, it does so as a | ||
secondary and begins syncing off the new primary. For more information, | ||
see :ref:`failover`. | ||
|
||
Member Configurations | ||
--------------------- | ||
|
||
Replica sets provide the following configurable, special-purpose | ||
members: | ||
|
||
- :ref:`Arbiters <replica-set-arbiters>`. Arbiters have no data and | ||
exist solely to participate in elections for primary and to break ties | ||
for sets that have even numbers of members. | ||
|
||
- :ref:`Non-voting members <replica-set-non-voting-members>`. Non-voting | ||
members are used only in sets with more than 12 members. The maximum | ||
number of voting members in a set is 12. | ||
|
||
- :ref:`Hidden members <replica-set-hidden-members>`. Hidden members | ||
provide reporting, dedicated backups, and dedicated read-only testing | ||
and integration support. | ||
|
||
- :ref:`Delayed members <replica-set-delayed-members>`. Delayed members | ||
copy and apply operations from the primary's oplog but with a | ||
specified delay and can help recover data loss from human error. | ||
|
||
For more information on member configurations, see | ||
:ref:`replica-set-member-configuration`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/replica-set/replication/