content_image/809465.jpg
<img src='content_image/809465.jpg'>

## States 

## Core States 

## PRIMARY 

Members in PRIMARY (page 655) state accept write operations. A replica set has at most one primary at a time. A SECONDARY (page 655) member becomes primary after an election (page 580). Members in the PRIMARY (page 655) state are eligible to vote. 

## SECONDARY 

Members in SECONDARY (page 655) state replicate the primary’s data set and can be configured to accept read operations. Secondaries are eligible to vote in elections, and may be elected to the PRIMARY (page 655) state if the primary becomes unavailable. 

## ARBITER 

Members in ARBITER (page 655) state do not replicate data or accept write operations. They are eligible to vote, and exist solely to break a tie during elections. Replica sets should only have a member in the ARBITER (page 655) state if the set would otherwise have an even number of members, and could suffer from tied elec- tions. There should only be at most one arbiter configured in any replica set. 

See Replica Set Members (page 564) for more information on core states. 

## Other States 

## STARTUP 

Each member of a replica set starts up in STARTUP (page 655) state. mongod then loads that member’s replica set configuration, and transitions the member’s state to STARTUP2 (page 655). Members in STARTUP (page 655) are not eligible to vote, as they are not yet a recognized member of any replica set. 

## STARTUP2 

Each member of a replica set enters the STARTUP2 (page 655) state as soon as mongod finishes loading that member’s configuration, at which time it becomes an active member of the replica set. The member then decides whether or not to undertake an initial sync. If a member begins an initial sync, the member remains in 

