MongoDB - Simple Database Solution For Kick-Ass Performance


MongoDB : A simple database solution for kick-ass performance.

MongoDB is a powerful, flexible, high performance document-orientated database that provides high availability and automatic scaling with features such as secondary and geospatial indexes, range queries, sorting and aggregation. 

Tens of thousands of organizations, including Adobe, Bosch, Carfax, Craigslist, Ebay, Forbes, and McAfee use MongoDB to build high-performance systems at scale. Over a third of the Fortune 100 and many of the most successful and innovative web companies rely on MongoDB to effectively handle their constantly growing data requirements. 

MongoDB was developed in order to address the rapid rise in the amount of data stored, the frequency in which this data is accessed, and the performance and processing needs of modern web applications. Relational databases in contrast, were not designed to cope with the scale, performance and agility challenges that face modern web applications today.

High Performance Database

Extraordinary performance was a primary design goal for MongoDB, almost every aspect of MongoDB was designed to provide high performance data access.

Although MongoDB is very powerful and replaces many features of relational databases systems, it is not intended to do everything that a relational database does. When possible, the MongoDB enables processing to be done by the drivers or by the application itself. Maintaining this streamlined design is one of the reasons MongoDB can achieve such high performance.

In addition to support for embedded data models which reduces I/O activity on the database system, and indexes support for faster queries that can include keys from embedded documents and arrays, MongoDB makes extensive use of RAM to speed up database operations. Reading data from memory is measured in nanoseconds, whereas reading data from hard drives is measured in milliseconds; reading from memory is approximately 100,000 times faster than reading data from disk. 

Data Compression 

The WiredTiger storage engine used by MongoDB supports native compression, reducing physical storage footprint by as much as 80%. In addition to reduced storage space, compression enables much higher storage I/O scalability as fewer bits are read from disk.

MongoDB is ideal for:

  • Large volumes of structured, semi-structured, and unstructured data.
  • Object-oriented programming that is easy to use and flexible.
  • Creating efficient, scalable systems instead of expensive, monolithic ones.

Dynamic Schemas

Data in MongoDB has a flexible schema. Unlike SQL databases, where you must first determine and declare a table’s schema before inserting data, MongoDB uses structures known as documents which are paired with key values. Documents can contain many different key-value pairs, key-array pairs, or even nested documents. This document based approach enables the insertion of data without a predefined schema, which makes it easy to make significant changes to the application in real-time, without worrying about down time or service interruptions. You can change the structure of documents simply by adding new fields or deleting existing ones. Documents in a collection do not need to have an identical set of fields. 

By enabling embedded documents and arrays, it is possible to represent complex hierarchical relationships within a single record. This fits naturally into the way developers using modern object-oriented languages think about their data.

Data within MongoDB is stored in Binary JSON (BSON)format, which is a binary extension of the JavaScript Object Notation (JSON) format. JSON is an open, human and machine-readable standard that facilitates easy, accurate data interchange, and is the main format for data exchange in modern web applications. JSON supports all of the basic data types, including numbers, strings, and boolean values, as well as arrays and hashes. 

Because of the use of the JSON data format, query results can be easily parsed, with little or no transformation by the application with most popular programming languages.

MongoDB Scales Easily by Auto-Sharding

As the amount and type of data that organizations need to store grows and changes, the choice of how should you scale your databases arises. Scaling a database comes down to the choice between vertical scaling (getting a bigger machine) or sharding (partitioning data across more machines).

Because of the way they are structured, relational databases usually scale vertically. Vertical scaling requires more CPU and storage resources to increase capacity. Scaling by adding hardware to a single machine has physical limitations. As a result there is a practical maximum capability for vertical scaling.

Sharding, or horizontal scaling, by contrast, divides the data set and distributes the data over multiple servers, or shards. Each shard is an independent database, and collectively, the shards make up a single logical database.

MongoDB was designed to scale out. Its document-oriented data model makes it easier for it to split up data across multiple servers. MongoDB automatically takes care of balancing data and load across a cluster, redistributing documents automatically and routing user requests to the correct machines. This allows developers to focus on programming the application, not scaling it. When a cluster needs more capacity, new machines can be easily added and MongoDB will figure out how the existing data should be distributed to them.

MongoDB or any NOSQL database is not for every use case, but if your data can be arranged in such a way as to benefit from the document based data model then your system can benefit greatly from increased performance and scalability. 


Contact us to learn more about developing a high performance database solution for your business.



Sharing is caring:

Dialogue & Discussion