Database Reference
In-Depth Information
7.
Re-enable your application when you are satisfied that everything looks OK.
8.
Test your application carefully before reopening the service or diverting traffic back to this
server.
Rolling Upgrade of MongoDB
One of the great features of having a replica set is that it can be used to perform a rolling upgrade. This is a method
designed to minimize the potential downtime and impacts involved with large changes like this. In addition to following
the process outlined below you should always take a backup and be testing in your non-production environment. Once
you have performed due diligence to ensure that your system is recoverable, you can follow this process:
1.
Stop and perform an upgrade for each secondary one at a time.
Run the rs.stepDown() command on the primary. One of the upgraded secondaries will
step into place as primary.
2.
3.
Upgrade the primary.
Monitoring MongoDB
The MongoDB distribution contains a simple status-monitoring tool called mongostat . This tool is designed mainly to
provide a simple overview of what is happening on your server (see Figure 9-5 ).
Figure 9-5. Monitoring the status of MongoDB with the mongostat utility
The statistics produced by this tool are not extensive, but they do provide a good overview of what is going on
in your MongoDB installation. For example, this display lets you see how frequently database operations are being
performed, the rate at which the index is hit, and how much time your application spends blocked as it waits for locks
on the database to be released.
 
Search WWH ::




Custom Search