Supporters claim that MongoDB is the fastest-growing database ecosystem. Why is the document-oriented data model so popular? Because it’s highly scalable, said Charity Majors, engineering manager for Parse, the Facebook subsidiary tasked with building the social network’s app ecosystem.
Mongo is also easy to learn, so Majors doesn’t look for vast experience with the open-source database when she hires DBAs. Instead, she asks the following questions to identify prospects with a DevOps mindset and a grasp of database-management fundamentals.
How would you find slow queries in Mongo?
- What Most People Say: “Umm, I guess I would tail the slow query log to find the most time-consuming queries.”
- What You Should Say: “I would look for patterns by reviewing the aggregate stats in the MongoDB log file and analyzing the queries in each family or group. Slow response time often results from inefficient read queries, which can cause high CPU load, or inefficient write queries which can cause high lock. Finally, I would augment my analysis with specific log file metrics. I have been able to spot bottlenecks and fine-tune Mongo’s performance using this approach.”
- Why You Should Say It: Reviewing log files and identifying one slow query isn’t enough. You need to get a holistic sense of what’s happening in the database in order to optimize performance. For instance, you need to see what happens to runtimes as you aggregate larger amounts of data. DBAs need the ability to diagnose problems and optimize performance as a database grows.
Which tools do you use to monitor MongoDB?
- What Most People Say: “I’m familiar with MongoDB Management Services (MMS).”
- What You Should Say: “First of all, we did all of our monitoring in-house at my last company. We found that having a single source of information and continuous monitoring of data, reporting and operational parameters facilitated root cause analysis, diagnostics and early remediation. I’m familiar with several self-hosted monitoring tools including Ganglia, Graphite, Splunk and Kibana. Would you like to hear about the monitoring process we developed?”
- Why You Should Say It: True DevOps pros like to establish a single source of truth so they can correlate events across multiple database platforms and systems. Plus, most ops teams prefer to use their own tools and processes to monitor their environments and systems.
How would you automate and manage replica sets in MongoDB?
- What Most People Say: “Replica sets don’t need to be automated.”
- What You Should Say: “I typically use Chef or Puppet to automate and manage replica sets. I simply grab the AWS and MongoDB cookbooks, create a site wrapper cookbook, make a role for the cluster, launch some nodes and initiate a replica set. I also use Chef to automate every aspect of the management of our Mongo ecosystem.”
- Why You Should Say It: Using automation and tooling to deploy and manage replica sets is a DevOps best practice that enhances performance, scalability and efficiencies as a database grows and ages.
- Why My Team Went With DynamoDB Over MongoDB
- MongoDB’s CEO Put a Face on Work-Life Balance