concept Replica in category mongoDB

appears as: Replica
MongoDB in Action, Second Edition: Covers MongoDB version 3.0

This is an excerpt from Manning's book MongoDB in Action, Second Edition: Covers MongoDB version 3.0.

  • Replica pairs deprecated —Replica set pairs are no longer supported by MongoDB, Inc.
  • Table 11.1. Replica set states

    State

    State string

    Notes

    0 STARTUP Indicates that the replica set is negotiating with other nodes by pinging all set members and sharing config data.
    1 PRIMARY This is the primary node. A replica set will always have at most one primary node.
    2 SECONDARY This is a secondary, read-only node. This node may become a primary in the event of a failover if and only if its priority is greater than 0 and it’s not marked as hidden.
    3 RECOVERING This node is unavailable for reading and writing. You usually see this state after a failover or upon adding a new node. While recovering, a data file sync is often in progress; you can verify this by examining the recovering node’s logs.
    4 FATAL A network connection is still established, but the node isn’t responding to pings. This usually indicates a fatal error on the machine hosting the node marked FATAL.
    5 STARTUP2 An initial data file sync is in progress.
    6 UNKNOWN A network connection has yet to be made.
    7 ARBITER This node is an arbiter.
    8 DOWN The node was accessible and stable at some point but isn’t currently responding to heartbeat pings.
    9 ROLLBACK A rollback is in progress.
    10 REMOVED The node was once a member of the replica set but has since been removed.