What is the command syntax that tells you whether you are on the master server or not? And how many master does mongodb allow?
Answer Posted / Rajat Prakash Singh
To check if you're connected to the master server in MongoDB, use the `rs.isMaster()` command. MongoDB allows a replica set to have one primary and any number of secondary servers.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers