Using rs.status() frequently.

96 views
Skip to first unread message

Raidon

unread,
May 28, 2014, 11:35:48 AM5/28/14
to mongod...@googlegroups.com
Does frequent use of rs.status() (every mintue) will impact performance of mongodb?
I am using it for monitoring purpose.

I would also like to know about all the commands can be useful in monitoring replication.

William Berkeley

unread,
Jun 26, 2014, 4:16:15 PM6/26/14
to mongod...@googlegroups.com
Hi Raidon,

the performance impact of running rs.status() every minute will be minimal and most likely completely imperceptible. From the documentation for rs.status available here: http://docs.mongodb.org/manual/reference/method/rs.status/, rs.status() information is returned based on the heartbeat packets sent amongst members of a replica set, so rs.status() simply reads back a small amount of information that it is regularly collecting through heartbeats in the background.

There is no additional network traffic to other members of the replica set to perform rs.status().

To find out all of the useful replica set commands, use rs.help() in the shell or consult the documentation at http://docs.mongodb.org/manual/reference/replication/. For monitoring, I would suggest looking into the following commands:

rs.conf()
rs.printReplicationInfo()
rs.printSlaveReplicationInfo()
rs.status()

-Will
Reply all
Reply to author
Forward
0 new messages