DBAtlas · Database operations atlas

Step down the primary (stepDown)

MongoDBReplica Set

Command

rs.stepDown(60)

What it does

Demotes the current primary to secondary for the specified number of seconds and triggers a new election.

When to use it

To hand the primary role over to another node before planned maintenance.

Caution

A brief write outage occurs during stepDown; the application must reconnect.

Open in DBAtlas →

Related