Part 3. MongoDB mastery – MongoDB in Action

Part 3. MongoDB mastery

Having read the first two parts of the book, you should understand MongoDB quite well from a developer’s perspective. Now it’s time to switch roles. In this final part of the book, we’ll look at MongoDB from the database administrator’s perspective. This means we’ll cover all the things you need to know about performance, deployments, fault tolerance, and scalability.

To get the best performance from MongoDB, you have to design efficient queries and then ensure that they’re properly indexed. This is what you’ll learn in chapter 7. You’ll see why indexes are important, and you’ll learn how they’re chosen and then traversed by the query optimizer. You’ll also learn how to use helpful tools like the query explainer and the profiler.

Chapter 8 is devoted to replication. You’ll spend most of this chapter learning how replica sets work and how to deploy them intelligently for high availability and automatic failover. In addition, you’ll learn how to use replication to scale application reads and to customize the durability of writes.

Horizontal scalability is the holy grail for modern database systems; MongoDB scales horizontally by partitioning data in a processes known as sharding. Chapter 9 presents sharding theory and practice, showing when to use it, how to design schemas around it, and how to deploy it.

The last chapter describes the niceties of deployment and administration. In chapter 10 we’ll look at specific hardware and operating system recommendations. You’ll then learn how to back up, monitor, and troubleshoot live MongoDB clusters.