en programming language Web related css3 AWS DocumentDB Getting Started Guide

AWS DocumentDB Getting Started Guide

In response to the growing number of customers unable to run MongoDB at scale, Amazon implemented the DocumentDB solution.

Easily scale from 10 GB to 64 TB with DocumentDB’s automatic data scaling. Let’s see how this can be done.

AWS DocumentDB Getting Started Guide
AWS DocumentDB Getting Started Guide

What is DocumentDB?

AWS DocumentDB is a scaled-up version of the previous MongoDB version 3.6. Amazon saw the need to architect a solution for large amounts of data and mission-critical workloads. DocumentDB does not use MongoDB source code. Therefore, this is an Amazon proprietary implementation.

DocumentDB, like MongoDB, is a document store engine. AWS DocumentDB is a NoSQL database. Document store engines are typically in JSON format. That is, index the JSON data structure. Amazon DocumentDB is a MongoDB drop solution by AWS, but it’s different.

Before we dive into Amazon DocumentDB, it’s important to understand NoSQL and why it’s the next big thing right now.

AWS DocumentDB Getting Started Guide
AWS DocumentDB Getting Started Guide

What is a NoSQL database?

aws documentdb nosql
aws documentdb nosql

NoSQL databases do not have interrelated tables (aka “not just SQL”). Most of the time, there are two main types of things people use: documents and charts. It can handle large amounts of data and large user loads.

Developers’ use of NoSQL databases was for performance, not storage. NoSQL data is semi-structured and polymorphic, making it easy to hold large amounts of unstructured data.

In addition to being more consistent than relational databases, NoSQL databases are easier to scale and require fewer resources. Unlike SQL databases, NoSQL databases can be stacked. Schemaless NoSQL databases allow for a variety of database item structures.

More and more developers are starting to host their programs and data in the public cloud. Extending, not above, and intelligently geolocating data was a key requirement. These are features of MongoDB.

Companies everywhere are adopting NoSQL. For example, financial and medical data are important use cases (such as storing IoT measurements from a smart cat litter box).

AWS DocumentDB Getting Started Guide
AWS DocumentDB Getting Started Guide

What led to the birth of DocumentDB?

Amazon came up with this idea because many people were struggling to run MongoDB at scale. Amazon realized that current solutions, including MongoDB Atlas, couldn’t solve their customers’ problems, so they came up with their own solutions.

For example, with DocumentDB, you can automatically grow your database from 10 GB to 64 TB without having to do anything. Before DocumentDB, this type of data was difficult to develop.

Amazon’s solution also has built-in fault tolerance. Your storage space is automatically divided into 10 GB chunks across many disks. Each 10 GB chunk of storage volume is replicated six times across three Availability Zones for backup.

Up to two copies of data may be lost, but write availability is not affected. Additionally, read availability is not affected if three documents are lost. It also has self-healing storage capacity. Data blocks and disks are checked for errors and automatically corrected.

Since Amazon hosts the service, most of the rules are covered. Compliant with many standards such as PCI DSS and ISO 9001. It is also SOC 1, SOC 2, SOC 3, and HIPAA compliant.

AWS DocumentDB Getting Started Guide
AWS DocumentDB Getting Started Guide

Advantages of DocumentDB

#1. MongoDB compatible

Amazon DocumentDB works with MongoDB 3.6 and 4.0 drivers. Customers can use many of the same apps, drivers, and tools as Amazon DocumentDB.

Amazon DocumentDB uses Apache 2.0 open source MongoDB 3.6 and 4.0 APIs to simulate MongoDB servers. The performance, scalability, and availability you need for mission-critical MongoDB applications is now available.

#2.Monitoring

Amazon DocumentDB provides Amazon CloudWatch analytics for cloud database servers. You can use the AWS Management Console to monitor cluster performance in areas such as compute and memory. Includes query throughput, number of MongoDB operations, and active connections.

#3.Latency

Amazon DocumentDB supports JSON documents, several data types, and fast indexing. The in-memory architecture allows the service to quickly evaluate queries against large documents.

#4.Access control

Amazon DocumentDB supports RBAC using built-in defined roles. RBAC allows you to implement least privilege by restricting the actions that users can perform.

As part of AWS Identity and Access Management (IAM), you can manage what AWS IAM users and groups can do with Amazon DocumentDB resources such as clusters, instances, snapshots, and parameter groups. You can also tag your Amazon DocumentDB resources to regulate IAM users and groups.

#5.Encryption

You can use AWS Key Management Service to encrypt your Amazon DocumentDB (KMS) database.

Data in the underlying storage is protected using Amazon DocumentDB encryption, as well as automated backups, snapshots, and replicas in your cluster. Connections from clients to Amazon DocumentDB are automatically encrypted with TLS.

#6.Compliance certification

Amazon DocumentDB is built on the highest security standards to help you meet your own regulatory and compliance needs. Amazon DocumentDB is PCI DSS, ISO 9001, 27001, 27017, and 27018 compliant, SOC 1, 2, and 3 compliant, and HIPAA compliant.

#7. Global cluster with high availability

Amazon DocumentDB global clusters enable global reads and disaster recovery. Replicate your data to up to five AWS sites with minimal performance impact.

#8.Multi- AZ deployment with replicas

Amazon DocumentDB has up to 15 replicas across three Availability Zones and automatically replaces instances if they fail. If it fails, Amazon DocumentDB attempts to create a new sample.

#9. Fault-tolerant and self-healing storage

The storage volume is copied six times across three AZs. Amazon DocumentDB provides fault-tolerant storage that manages data loss for up to two copies without impacting write availability. Amazon DocumentDB storage is also self-healing, replacing failed data blocks or disks.

Frequently asked questions about AWS DocumentDB

Is AWS DocumentDB the same as MongoDB?

Amazon DocumentDB (compatible with MongoDB) is a fully managed document database service that is fast, scalable, and fully managed for use with MongoDB workloads.

JSON data can be stored in Amazon DocumentDB as a document database. Easily store, search, and index your data.

Customers can use AWS Database Migration Service (DMS) for free for six months to quickly and easily migrate nonrelational databases on-premises or Amazon Elastic Cloud (EC2) MongoDB to AWS Database Migration Service (DMS) with little to no downtime. Easy to migrate. .

How does Amazon DocumentDB work?

Amazon DocumentDB interacts with the Apache 2.0 open source MongoDB 3.6 and 4.0 API as a document database. As a result, you can use the same MongoDB drivers, applications, and tools with Amazon DDocumentDB with little or no modification.

How can I scale Amazon DocumentDB?

Amazon DocumentDB is a web-scale database that scales from 10 GB to 64 TB in 10 GB increments. Amazon DocumentDB’s storage and compute capacity can be scaled vertically and horizontally (to improve read throughput) by adding additional replica instances (up to 15) to your cluster.

What are the main features of Amazon DocumentDB from a design perspective?

A cloud-first architecture was used to build Amazon DocumentDB from the ground up. This means you can easily scale your JSON workloads.

A key part of DocumentDB’s design is to separate storage and processing so that each can grow at its own pace. DocumentDB provides a distributed, fault-tolerant, and self-healing storage system. Each database cluster can store up to 64 TB of data without partitioning.

conclusion

DocumentDB is Amazon’s only managed MongoDB compatible service. According to Amazon, DocumentDB has twice the throughput of currently available MongoDB solutions. An alternative is to manage the database with EC2/EBS, but this is difficult.

If you want these guarantees, choose DocumentDB or stick with MongoDB. Another reason to choose DocumentDB is to store everything on AWS.