Newsletters




Sponsored Content: Amazon DocumentDB: An Introduction to the Value of Document Databases


A document database is a type of nonrelational database that is designed to store and query data as JSON-like documents. Document databases make it easier for developers to store and query data in a database by using the same document-model format they use in their application code. The flexible, semistructured, and hierarchical nature of documents and document databases allows them to evolve with applications’ needs. The document model works well with use cases such as catalogs, user profiles, and content management systems where each document is unique and evolves over time. Document databases enable flexible indexing, powerful ad hoc queries, and analytics over collections of documents.

Flexible Schema for Fast Iteration

Document-oriented databases are one of the fastest growing categories of NoSQL databases, and the primary reason is the flexibility of schema or logic design. Relational databases (RDB) store data into unique tables that must be pre-defined prior to adding or analyzing data. The structure of these tables is purposely rigid, with strict parameters. Conversely, document databases store and query data as JSON-like documents. Documents are similar to the programming concept of an object, and are not required to adhere to a standard schema. Document databases make it easier for developers to store and query data in a database by using the same document-model format they use in their application code. The flexible, semi-structured, and hierarchical nature of documents and document databases allows them to evolve with applications’ needs. The document model works well with use cases such as catalogs, user profiles, and content management systems where each document is unique and evolves over time. Document databases enable flexible indexing, powerful ad hoc queries, and operational analytics over collections of documents.

Customer Snapshot:  Asahi Shimbun (Click to Enlarge)Amazon image #1

JSON Data

JavaScript Object Notation, more commonly known by the acronym JSON, is an open data interchange format that is both human and machine-readable. Despite the name JavaScript Object Notation, JSON is independent of any programming language and is a common API output in a wide variety of applications.

JSON represents data in two ways:

  • Object: a collection of name-value (or key-value) pairs. An object is defined within left ({) and right (}) braces. Each name-value pair begins with the name, followed by a colon, followed by the value. Name-value pairs are comma separated.
  • Array: an ordered collection of values. An array is defined within left ([) and right (]) brackets. Items in the array are comma separated

A JSON document database is designed to store and query data as JSON documents, rather than normalizing data across multiple tables, each with a unique and fixed structure, as in a relational database.  JSON document databases use the same document-model format that developers use in their application code, which make it much easier for them to store and query data. The flexible, semi-structured, and hierarchical nature of JSON document databases allows them to evolve with applications’ needs. JSON document databases provide powerful and intuitive APIs for flexible and agile development.

JSON Data Model (Click to Enlarge)
Amazon image #2

Amazon DocumentDB: Highly Available MongoDB-Compatible Database Service

For readers that need an introduction to Amazon DocumentDB (with MongoDB compatibility), it is a database service that is purpose-built for JSON data management at scale, fully managed and integrated with AWS, and enterprise-ready with high durability. DocumentDB’s core benefits are the following:

  • Scales with ease: Amazon DocumentDB is engineered with scalable workloads in mind and allows compute and storage to scale independently. You can easily scale read capacity to millions of requests per second.
  • Fully managed by AWS: With Amazon DocumentDB, you don’t need to worry about database management tasks, such as hardware provisioning, patching, setup, configuration, backups, or scaling. Amazon DocumentDB automatically and continuously monitors and backs up your cloud database to Amazon S3.
  • Amazon DocumentDB Global Clusters automatically replicates data across up to five AWS regions with sub-second latencies to provide disaster recovery in the unusual event of a region-wide outage.
  • Durable, available, and secure: Amazon DocumentDB is highly durable and ready for enterprise applications, with data automatically replicated six ways across 3 AZs (Availability Zones).
  • MongoDB-compatible: Amazon DocumentDB implements the Apache 2.0 open source MongoDB 3.6 and 4.0 APIs by emulating the responses that a MongoDB client expects from a MongoDB server, allowing you to use your existing MongoDB drivers and tools with Amazon DocumentDB. Updating the application is as easy as changing the database endpoint to the new Amazon DocumentDB Cluster.

Since Amazon DocumentDB launched in 2019, the service has been continuously evolving to meet the demand of current and future customers. Amazon’s philosophy of customer obsession isn’t limited to customer support and engagements, but rather it also extends to the heart of product development. Ninety percent of AWS’ portfolio and service features are a direct result of customer requests and feedback. Below we will detail a recently launched feature for DocumentDB and explain how this new functionality will aid current customers.

With the launch of Global Clusters in June, Amazon DocumentDB now enables you to deploy a cluster that spans across multiple AWS Regions. Global Clusters replicate your data to clusters in up to five regions with little to no impact on performance. Global Clusters provide faster recovery from region-wide outages and enable low-latency global reads. Amazon DocumentDB Global Clusters uses storage-based fast replication across regions with latencies that are less than 1 second, using dedicated infrastructure with no impact to your workload’s performance. In the unlikely event of a regional degradation or outage, one of the secondary regions can be promoted to full read/write capabilities in less than 1 minute. You can have up to five secondary regions with Global Clusters, and each secondary region can have up to 16 replica instances. 

Amazon DocumentDB Global Clusters: How It Works (Click to Enlarge)Amazon image #3

Below are the primary customer benefits customers can gain with Global Clusters:

  • Disaster recovery from region-wide outages: Region-wide outages are uncommon but, if they do occur, Global Clusters allows you to recover in less than 60 seconds. You can promote your secondary cluster to a standalone cluster and recreate a global database in a different region without any data loss.
  • Global reads with low latency: You can use Global Clusters to replicate data to other regions so that users can read data from secondary clusters in regions that are closest to them. Global Clusters serve reads locally and with low latency from secondary clusters, while using the primary cluster for writes, helping optimize for use cases with a high read to write ratio.
  • Scalable secondary clusters: You can scale each secondary cluster independently, as the number and type of instances in the primary and secondary clusters don’t need to be the same. You can create secondary clusters with one replica instance and scale up to 16 instances as needed. Scaling instances in Amazon DocumentDB takes less than 10 minutes, regardless of the data volume.
  • High-speed replication across clusters: Global Clusters uses fast, storage-based physical replication of data from primary to secondary clusters. The compute instances provisioned don’t participate in replication, which frees them up for serving application requests.


Why Do Customers Choose Amazon DocumentDB? (Click to Enlarge)Aamazon image #4

In addition to the benefits above, below you will find some of the common customer use cases for DocumentDB, and you can review a variety of customer success stories on the product page that show how your peers are using the service and what benefits they experienced.

Amazon DocumentDB Customer Use Cases (Click to Enlarge)
Amazon image #5

For more information on Global Clusters, be sure to visit the feature page highlighted above and watch this technical introduction video.  For more details on Amazon DocumentDB, visit the service “getting started guide”. Finally, new or existing customers can use AWS Database Migration Service (DMS) at no charge (for 6 months) to easily migrate self-managed document databases to Amazon DocumentDB.


Sponsors