Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
MongoDB High Availability

You're reading from  MongoDB High Availability

Product type Book
Published in Jul 2014
Publisher
ISBN-13 9781783986729
Pages 164 pages
Edition 1st Edition
Languages
Author (1):
Afshin Mehrabani Afshin Mehrabani
Profile icon Afshin Mehrabani

Table of Contents (17) Chapters

MongoDB High Availability
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Understanding the MongoDB Architecture and Processes 2. Understanding MongoDB's Failures and Limitations 3. Clustering in MongoDB 4. Utilizing a Replica Set 5. Replica Set in Action 6. Understanding the Concept of Sharding 7. Sharding in Action 8. Analyzing and Improving Database Performance 9. Migrating Instances and Reducing Downtime 10. Monitoring and Troubleshooting the Database Index

Failover testing


In this section, we will deactivate the specific nodes to force the replica set to make an election and change the nodes' role.

First of all, we will deactivate one of the secondary nodes by stopping the mongod service on the secondary machine.

Right after stopping the service of mongod3.replicaset.com, the replica set will set this node as an unreachable secondary node, as shown in the following screenshot:

The status of the replica set shows that the third member has an issue, so this member becomes unavailable until the replica set gets a ping from it. After starting the service again, the members' status changes again as shown in the following screenshot:

Note

Network issues or hardware failure on the member's machine also has the same result as stopping the MongoDB service.

For the next test, we will halt the primary node's service. After stopping the service in the primary node, the replica set uses an election process to choose the next primary node from secondary nodes...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}