Databases are the most common cause of poor application performance, making performance optimization critical for any production database, according to Guy Harrison, co-author of a new book, titled MongoDB Performance Tuning.
Recently, Harrison explained the growing importance of MongoDB in the enterprise and how the book, which he wrote with software developer Michael Harrison, helps put MongoDB performance on track.
Harrison is an Oracle ACE alumni and a MongoDB-certified DBA and developer and the CTO of Southbank Software, which offers ProvenDB, a blockchain-enabled database service that allows MongoDB developers to build applications that include cryptographic proof of data integrity and provenance without having to understand blockchain programming complexities.
DBTA: What is it about MongoDB that makes it such an important topic as a technology area?
Guy Harrison: If you look at db-engines.com, you'll see that the top five databases are Oracle, MySQL, SQL Server, Postgres, and MongoDB, and that these five are way ahead of any other databases. Of the top five, only MongoDB represents a 21st century database. All the rest were created in the 1980s or 1990s.
DBTA: What is it that makes MongoDB so successful among the "new" databases?
GH: Mainly in my opinion it is that MongoDB aligns really well with the working practices of modern developers. Object orientation, agile processes, and continuous integration are best practices for almost all developers. But the relational database management systems for all their obvious strengths work against these practices by forcing developers to translate their objects into normalized tables and requiring ALTER TABLE statements whenever new attributes are defined. With MongoDB, the schema definition is all in the application code, and the schema matches the application objects. This allows developers to iterate fast without having to get permission from a DBA anytime they want to change a data structure.
DBTA: What is the angle that has not been covered elsewhere?
GH: This is the first book to focus on MongoDB performance optimization. Performance optimization is critical for any production database. Databases are the most common cause of poor application performance because they involve the slowest operations disk I/O and network data transfer. And we know that poor performance can doom the success of an application or especially in the cloud make it overly expensive, so it's about time that we had a book dedicated to the topic.
DBTA: What are some of the least understood aspects of this?
GH: The first releases of MongoDB had a relatively simplistic architecture that offered somewhat limited tuning opportunities. But over time, MongoDB has adopted more advanced architectures and programming options that create both more performance challenges and tuning opportunities. Furthermore, MongoDB is finding its way more and more into mission-critical situations where the imperative to optimize performance is greater.
DBTA: What are the insights and knowledge that you hope people will gain from reading this book?
GH: We've been big believers in systematic performance tuning for a long time. That is the philosophy that you don't optimize database systems simply by addressing the symptoms of poor performance. For instance, it might be possible to improve performance by buying expensive new hardware or increasing the size of a cloud-based virtual machine (VM). But just as often, a change to a single line of code could reduce the workload demand and save the time and expense of a hardware upgrade so it's important that we address the causes of performance bottlenecks, rather than just the symptoms.
DBTA: What was your approach with the book?
GH: We wanted to bring a "floor-to-ceiling" approach to tuning, covering every aspect from the design of the document schema all the way through to the selection of server hardware. Performance is the result of interactions of software and hardware through the entire stack, and we were determined not to neglect any of those aspects.
Michael and I have been working with MongoDB for many years now and it's safe to say we're fans! We hope that we can share what we've learned about MongoDB performance with the community and help people succeed in their MongoDB applications.
MongoDB Performance Tuning by Guy Harrison and Michael Harrison is now available for order at www.amazon.com/gp/product/1484268784.