Thursday, 7 July 2022

AWS Elastic Cache : Theory

 

What is Elasticache?


Elasticache is a web service used to deploy, operate, and scale an in-memory cache in the cloud.

  • It improves the performance of web applications by allowing you to retrieve information from fast, managed in-memory cache instead of relying entirely on slower disk-based databases.
  • For example, if you are running an online business, customers continuously asking for the information of a particular product. Instead of front-end going and always asking information for a product, you can cache the data using Elasticache.
  • It is used to improve latency and throughput for many read-heavy application workloads (such as social networking, gaming, media sharing, and Q&A portals) or compute intensive workloads (such as a recommendation engine).
  • Caching improves application performance by storing critical pieces of data in memory for low latency access.
  • Cached information may include the results of I/O-intensive database queries or the results of computationally-intensive calculations.
Types of ElasticacheTypes of Elasticache
Memcached
  • Amazon Elastic cache for Memcached is a Memcached-compatible in-memory key-value store service which will be used as a cache.
  • It is an easy-to-use, high performance, in-memory data store.
  • It can be used as a cache or session store.
  • It is mainly used in real-time applications such as Web, Mobile Apps, Gaming, Ad-Tech, and E-Commerce.
Working of Memcached
  • Databases are used to store the data on disk or SSDs while Memcached keeps its data in memory by eliminating the need to access the disk.
  • Memcached uses the in-memory key-value store service that avoids the seek time delays and can access the data in microseconds.
  • It is a distributed service means that it can be scaled out by adding new nodes.
  • It is a multithreaded service means that it can be scaled up its compute capacity. As a result of this, its speed, scalability, simple design, efficient memory management and API support for most popular languages make Memcached a popular choice for caching use cases.
Benefits of Memcached
Memcached
  • Sub-millisecond response times
  • Simplicity
  • Scalability
  • Community
Following are the use cases of Memcached
  • Caching
  • Session store

Redis
  • Redis stands for Remote Dictionary Server.
  • It is a fast, open-source, and in-memory key-value data store.
  • Its response time is in a millisecond, and also serves the millions of requests per second for real-time applications such as Gaming, AdTech, Financial services, Health care, and IoT.
  • It is used for caching, session management, gaming, leaderboards, real-time analytics, geospatial, etc.
Working of Redis
  • Redis keeps its data in-memory instead of storing the data in disk or SSDs. Therefore, it eliminates the need for accessing the data from the disk.
  • It avoids seek time delays, and data can be accessed in microseconds.
  • It is an open-source in-memory key-value data store that supports data structures such as sorted sets and lists.
Benefits of Redis
  • In-memory data store
  • Redis stores the data in-memory while the databases such as PostgreSQL, MongoDB, etc store the data in the disk.
  • It does not store the data in a disk. Therefore, it has a faster response time.
  • It takes less than a millisecond for read and write operations, and supports millions of requests per second.
  • Flexible data structures
  • It supports a variety of data structures to meet your application needs. The following are the data structures supported by Redis:
Data typeDescription
StringsIt is a text with up to 512MB in size.
ListsIt is a collection of strings.
SetsIt is an unordered collection of strings with the ability to intersect, union.
Sorted setsThe sets which are ordered by value.
HashesIt is a data structure used for storing the fields and its associated values.
BitmapsIt is a data type that provides bit-level operations.
HyperLogLogsIt is a probabilistic data structure used to estimate the unique items in a data set.
  • Simplicity
  • It allows you to write fewer lines of code to store, access, and use data in your applications.
  • For example, if the data of your application is stored in a Hashmap, and you want to store in a data store, then you can use the Redis hash data structure to store the data. If you store the data without any hash data structure, then you need to write many lines of code to convert from one format to another.
  • Replication and Persistence
  • It provides a primary-replica architecture in which data is replicated to multiple servers.
  • It improves read performance and faster recovery when any server experiences failure.
  • It also supports persistence by providing point-in-time backups, i.e., copying the data set to disk.
  • High availability and scalability
  • It builds highly available solutions with consistent performance and reliability.
  • There are various options available which can adjust your cluster size such as scale in, scale out or scale up. In this way, cluster size can be changed according to the demands.
  • Extensibility
  • It is an open-source project supported by a vibrant community.

Differences between Memcached and Redis
Basis for ComparisonMemcachedRedis
Sub-millisecond latencyIts response time is in sub-millisecond as it stores the data in memory which reads the data more quickly than disk.Its response time is in sub-millisecond as it stores the data in memory which read the data more quickly than disk.
Developer ease of useIts syntax is simple to understand and use.Its syntax is simple to understand and use.
Distributed architectureIts distributed architecture distributes the data across multiple nodes which allows to scale out more data when demand grows.Its distributed architecture distributes the data across multiple nodes which allows to scale out more data when demand grows.
Supports many different programming languagesIt supports languages such as C, C++, java, python, etc.It supports languages such as C, C++, java, python, etc.
Advanced data structureIt does not support advanced data structures.It supports various advanced data structures such as sets, sorted set, hashes, bit arrays, etc.
Multithreaded ArchitectureIt supports multithreaded architecture means that it has multiple processing cores. This allows you to handle multiple operations by scaling up the compute capacity.It does not support multithreaded architecture.
SnapshotsIt does not support the snapshots.Redis also keeps the data in a disk as a point-in-time backup to recover from the fault.
ReplicationIt does not replicate the data.It provides a primary replica architecture that replicates the data across multiple servers and scales the database reads.
TransactionsIt does not support transactions.It supports transactions that let to execute a group of commands.
Lua ScriptingIt does not support Lua Scripting.It allows you to execute Lua Scripts which boost performance and simplify the application.
Geospatial supportIt does not provide Geospatial support.It has purpose-built commands that work with geospatial data, i.e, you can find the distance between two elements or finding all the elements within a given distance.
x

There are two types of Elasticache:

Since, Memcached store the data in the server's main memory, and in-memory stores don't have to go to disk for the data. Therefore, it has a faster response time and also supports millions of operations per second.

The design of Memcached is very simple that makes it powerful and easy to use in application development. It supports many languages such as Java, Ruby, Python, C, C++, etc.

An architecture of Memcached is distributed and multithreaded that makes easy to scale. You can split the data among a number of nodes that enables you to scale out the capacity by adding new nodes. It is multithreaded means that you can scale up the compute capacity.

A Community is an open-source supported by a vibrant community. Applications such as WordPress and Django use Memcached to improve performance.

It implements the high-performance in-memory cache which decreases the data access latency, increases latency, ease the load of your back-end system. It serves the cached items in less than a millisecond and also enables you to easily and cost-effectively scale your higher loads.

It is commonly used by application developers to store and manage the session data for internet-based applications. It provides sub-millisecond latency and also scales required to manage session states such as user profiles, credentials, and session state.

Redis

Amazon Relational Database Service ( Amazon RDS ) : Theory

 Amazon Relational Database Service(Amazon RDS)

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate and scale relational databases in the cloud. It provides cost-efficient and resizable capabilities while automating time-consuming administration tasks such as hardware provisioning, database setup, patching, and backup. It frees you up to focus on your applications so that you can provide them with the fast performance, high availability, security and compatibility they need.

Amazon RDS is available on multiple database instance types - optimized for memory, performance or I/O - and gives you six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database and SQL Server Huh. You can use the AWS Database Migration Service to migrate easily or replicate your existing databases to Amazon RDS.

What is Amazon RDS?

Amazon Relational Database Service (RDS) is a managed SQL database service provided by Amazon Web Services (AWS). Amazon RDS supports an array of database engines to store and organize data. It also helps in relational database management tasks like data migration, backup, recovery and patching.

Amazon RDS facilitates the deployment and maintenance of relational databases in the cloud. Cloud administrators use Amazon RDS to set up, operate, manage, and scale relational instances of cloud databases. Amazon RDS itself is not a database; It is a service used to manage relational databases.

How does Amazon RDS work?

Databases store large amounts of data that applications can draw upon to help them perform various tasks. A relational database uses tables to store data and is called relational because it organizes data points with defined relationships.

Administrators control Amazon RDS with the AWS Management Console, Amazon RDS API calls, or the AWS command-line interface. They use these interfaces to deploy database instances to which users can apply specific settings.

Amazon provides several instance types with different resources, such as CPU, memory, storage options, and networking capability. Each type comes in a variety of sizes to suit the needs of different workloads.

RDS users can use AWS Identity and Access Management to define and set permissions to access RDS databases.

Amazon RDS Features

Amazon RDS features include the following:

Replication. RDS uses the replication feature to create read replicas, and these are read-only copies of the database instances that the application uses without changing the original production database. Administrators can also enable automatic failover across multiple availability zones through RDS multi-edge deployment and synchronous data replication.

Amazon Relational Database Service

RDS provides three types of storage:

A general-purpose solid-state drive (SSD). Amazon recommends this storage as the default choice.

Provisioned input-output operations per second (IOPS). SSD storage for I/O-intensive workloads.

Magnetic. A lower-cost option.

Monitoring. The Amazon CloudWatch service enables managed monitoring, and it lets users view capacity and I/O metrics.

Patching. RDS provides patches for whichever database engine the user chooses.

Backups. Another feature is failure detection and recovery. RDS provides managed instance backups with transaction logs to enable point-in-time recovery. Users pick a retention period and restore databases to any time during that period. They also can manually take snapshots of instances that remain until they are manually deleted.

Amazon Relational Database Service

RDS lets users specify the time and duration of the backup processes. They also can choose how long to retain backups and snapshots.

  • Incremental billing. Users pay a monthly fee for the instances they launch.
  • RDS uses public-key encryption to secure automated backups, read replicas, data snapshots and other data stored at rest.

What are the benefits and drawbacks of Amazon RDS?

There are several pros and cons to using Amazon RDS.

  • Easy to administer: Amazon RDS makes it easy to go from project conception to deployment. Use the Amazon RDS Management Console, the AWS RDS Command-Line Interface, or simple API calls to access the capabilities of a production-ready relational database in minutes. No need for infrastructure provisioning and no need for installing and maintaining database software.
  • Highly scalable: You can scale your database's compute and storage resources with only a few mouse clicks or an API call, often with no downtime. Many Amazon RDS engine types allow you to launch one or more Read Replicas to offload read traffic from your primary database instance.
  • Available and durable: Amazon RDS runs on the same highly reliable infrastructure used by other Amazon Web Services. When you provision a Multi-AZ DB Instance, Amazon RDS synchronously replicates the data to a standby instance in a different Availability Zone (AZ). Amazon RDS has many other features that enhance reliability for critical production databases, including automated backups, database snapshots, and automatic host replacement.
  • Fast: Amazon RDS supports the most demanding database applications. You can choose between two SSD-backed storage options: one optimized for high-performance OLTP applications and the other for cost-effective general-purpose use. In addition, Amazon Aurora provides performance on par with commercial databases at 1/10th the cost.
  • Secure: Amazon RDS makes it easy to control network access to your database. Amazon RDS also lets you run your database instances in Amazon Virtual Private Cloud (Amazon VPC), enabling you to isolate your database instances and connect to your existing IT infrastructure through an industry-standard encrypted IPsec VPN. Many Amazon RDS engine types offer encryption at rest and encryption in transit.
  • Inexpensive: You pay very low rates and only for the resources you consume. In addition, you benefit from the option of On-Demand pricing with no up-front or long-term commitments or even lower hourly rates via our Reserved Instance pricing.
  • Ease of use. Admins don't need to learn specific database management tools, and they also can manage multiple database instances using the management console. RDS is compatible with database engines that users may already be familiar with, such as MySQL and Oracle, and it automates manual backup and recovery processes.
  • Cost-effectiveness. According to AWS, customers only pay for what they use. Also, the time spent maintaining instances is reduced because maintenance tasks, such as backups and patching are automated.

Reading replicas routes read-heavy traffic away from the main database instance, reducing the workload on that one instance.

RDS splits up compute and storage so admins can scale them independently.

Drawbacks

Some downsides of using Amazon RDS include the following:

Lack of root access. Because it is a managed service, users do not have root access to the server running RDS. RDS restricts access for certain procedures to those with advanced privileges.

Downtime. Systems must go offline for some patching and scaling procedures, and the timing of these processes varies. With scaling, compute resources need a few minutes of downtime on average.

Amazon RDS database instances

A database administrator can create, configure, manage and delete an Amazon RDS instance, along with the resources it uses. An Amazon RDS instance is a cloud database environment. Admins can also spin up many databases or schemas; how many depends on the database used.

Amazon RDS limits each customer to a total of 40 database instances per account, and AWS imposes further limitations for Oracle and SQL Server instances. With those database instances, a user generally can only have up to 10.

Amazon RDS database engines

An AWS customer can spin up to six types of database engines within Amazon RDS:

  • Amazon Aurora is a proprietary AWS relational database engine. Amazon Aurora is compatible with MySQL and PostgreSQL.
  • RDS for MariaDBis compatible with Maria DB, an open-source relational database management system (RDBMS) that's an offshoot of MySQL.
  • RDS for MySQL is compatible with the MySQL open-source RDBMS.
  • RDS for Oracle Databaseis compatible with several editions of Oracle Database, including bring-your-own-license and license-included versions.
  • RDS for PostgreSQL is compatible with PostgreSQL open-source object-RDBMS.
  • RDS for SQL Serveris compatible with Microsoft SQL Server, an RDBMS.

Amazon RDS adds support for major and minor versions of database engines over time. It is designed to allow admins to specify an engine version when they create a database instance. In most cases, Amazon RDS can support developer code, applications, and tools already in use with existing databases.

AWS provides other database services, including the following:

  • Amazon DynamoDB key-value and document database for NoSQL databases;
  • Amazon Neptune for graph databases; and
  • AWS Database Migration Service to ease database transfers and transformations.

Amazon RDS use cases

Amazon RDS' scalability, security and availability make it useful for a variety of applications. Some possible uses include the following:

  • Online retailing.These applications manage complex databases that track inventories, transactions and pricing.
  • Mobile and online gaming. RDS supports developers that need to update these applications and users who need high availability continuously.
  • Travel applications. Applications like Airbnb take advantage of RDS' ability to simplify time-consuming database administration tasks and automate database replication. Mobile apps like Airbnb also take advantage of RDS' scalable storage capability.
  • Streaming applications. Applications like Netflix take advantage of RDS's storage scalability and the availability of Amazon RDS, which allows them to handle high demand daily.
  • Finance applications. Like other mobile applications, these applications can use RDS to simplify administrative database tasks and save time and money.

Business-to-business reporting company Enlyft said 6,096 companies were using Amazon RDS in 2021, including The American Red Cross, Penguin Random House and Zendesk. Amazon also reported in 2021 that Airbnb, Intuit and the U.S. The Department of Veterans Affairs is among the organizations that use RDS to support their data workloads.

Featured RDS Partners

App Associates

Apps Associate is an AWS partner and Oracle specialist in migrating enterprise workloads to the cloud, freeing customers to focus on high-value initiatives. Join our webinar to learn how Apps Associate helps customers move to Amazon Aurora.

Rackspace

Rackspace is an AWS partner that can help you implement modern application development best practices with Amazon Aurora to help you keep pace with customers and business needs. Read the eBook to learn how Rackspace helped TotalTracks automate processes and meet growing demand.

Use cases

Web and mobile applications

Web and mobile applications built to operate at very large scales require databases with high throughput, massive storage scalability, and high availability. Amazon RDS meets the needs of such highly demanding applications with room for future growth. Since Amazon RDS has no licensing constraints, it fits the variable usage patterns of these applications perfectly.

Airbnb

Airbnb chose Amazon RDS because it simplifies most of the time-consuming administrative tasks typically associated with databases. Airbnb uses Multi-Availability Zone (Multi-AZ) deployment to automate its database replication further and increase data durability. Airbnb was able to complete its entire database migration to Amazon RDS with only 15 minutes of downtime.

eCommerce application

Amazon RDS provides small and large eCommerce businesses with a flexible, secure, highly scalable and low-cost database solution for online sales and retailing. Amazon RDS provides a managed database that helps eCommerce companies meet PCI compliance and focuses on creating high-quality customer experiences without worrying about managing the underlying database.

Instacart

Instacart turned to Amazon RDS for its new same-day grocery delivery service to avoid the complexities of building a new production database from scratch. The company can now add millions of new items to its database each month, and its engineering team can focus on developing new features and improving the overall customer experience.

Mobile and Online games

Mobile and online games require a database platform with high throughput and availability. Amazon RDS manages the database infrastructure, so game developers don't have to worry about provisioning, scaling, or monitoring database servers. Amazon RDS provides a familiar database engine that can rapidly increase capacity to meet user demand.

Amazon Aurora and Amazon Aurora Serverless vs Amazon RDS

Amazon Aurora is a database engine created by Amazon. RDS is a service used to manage database engines and instances, including the Amazon Aurora database.

Amazon Aurora Serverless can also be used to manage instances of Amazon Aurora. Its automation features relieve developers from having to launch servers and manually manage database capacity.

With RDS, servers must be manually scaled, which can result in significant downtime. The automatic scaling capability of Aurora Serverless enables rapid deployment with little or no downtime.

One downside of Aurora Serverless is that it only works with Amazon Aurora, MySQL, and PostgreSQL. RDS is compatible with six database engines.

Amazon RDS is suitable for more predictable applications because capacity adjustment takes longer in RDS than in Aurora Serverless.

The takeaway

Amazon RDS helps organizations handle relational database management tasks such as migration, backup, recovery and patching. Some of the main features of Amazon RDS are replication, high-performance storage, and failure detection.

One of the biggest benefits of Amazon RDS is its ease of use, and it lets administrators manage multiple database instances without having to learn other database management tools.

These features allow RDS to help organizations cut costs from time-consuming database administration tasks and manage the hidden costs of using high-performance storage in AWS.

What is the future of Amazon RDS on VMware?

Amazon RDS on VMware provides Amazon's relational database service for on-premises VMware infrastructure and points to the potential future of hybrid cloud services.

Many people used to see VMware and AWS as bitter enemies, but that changed when they announced VMware Cloud on AWS in 2017. The announcement of Amazon RDS on VMware at VMworld 2018 indicated an evolving relationship between the two companies that could point to potential. For greater collaboration between cloud vendors and on-premises infrastructure.

The investment required to move everything to the cloud has proved too expensive for many organizations, so as realistic expectations are set, more and more cloud vendors will try to integrate the features and benefits of the cloud with their on-premises infrastructure.

Amazon RDS aims to make it easy to set up, run and develop relational databases. RDS provides a flexible and easy way to do previously tedious tasks like patching, capacity management and database tuning. Because this is an Amazon service, it only offers on-demand pricing for what you use or pay for reserved, dedicated capacity. Until recently, Amazon limited this service to Amazon Cloud.

Amazon RDS on VMware is in Technical Preview, so all the details about how the platform works are currently unavailable. If it's anything like the native Amazon RDS, you'll be able to create and manage databases from half a dozen popular database types, including Oracle and Microsoft SQL Server.

Amazon RDS for VMware will enable the affordable, high-availability hybrid deployment, simple database disaster recovery for AWS, and read-only clones of on-premises data in AWS. This partnership could help Amazon customers easily migrate traditional database deployment from their sites and AWS, even sites with difficult licensing requirements. It can also help VMware customers see the benefits of the AWS management stack for databases in traditional infrastructure.

Wednesday, 6 July 2022

AWS Amazon DocumentDB Theory

Amazon DocumentDB : 

While offering a MongoDB-compatible API, DocumentDB is not running MongoDB software, but “Amazon DocumentDB emulates the responses that a client expects from a MongoDB server by implementing the Apache 2.0 open source MongoDB 3.6 API” on top of an undisclosed storage engine. From some information, it looks like it is built on top of the Aurora storage subsystem that is also used by both Aurora MySQL and Aurora PostgreSQL. In fact the following features/limitations are common to both DocumentDB and Aurora:
  • both replicate six copies of data across three AWS Availability Zones
  • both have cluster size limit of 64 TB
  • both do not allow null characters (‘\0’ ) in strings
  • identifiers are limited to 63 letters for both
  • both persist a write-ahead log when writing
  • both don’t need to write full buffer page syncs.

High Availability
Fig. 1: DocumentDB availability
An Amazon DocumentDB cluster consists of two components:
  • Cluster volume: cluster has exactly one cluster volume, which can store up to 64 TB of data.
  • Instances: provide the processing power for the database, writing data to, and reading data from, the cluster storage volume. An Amazon DocumentDB cluster can have 0–16 instances:
  •  – Primary instance: supports read and write operations and performs all data modifications to the cluster volume. Each Amazon DocumentDB cluster has one primary instance.
  •  – Replica instance: supports only read operations. An Amazon DocumentDB cluster can have up to 15 replicas in addition to the primary instance.
Fig. 2: Deployment scenario

If the primary instance fails, an Amazon DocumentDB replica is promoted to the primary instance. There is a brief interruption during which read and write requests made to the primary instance fail with an exception. Amazon estimates this interruption is less than 120 seconds.
You can customise the order in which replicas are promoted to the primary instance after a failure by assigning each replica a priority, note that it is strongly suggested that replicas should be of the same instance class as the primary. It is also really important to create at least one or more Amazon DocumentDB replicas in two or more different Availability Zones, in this way your datastore can survive a zone failure.

Scalability & Replication

By placing replica instances in separate Availability Zones, it is possible to scale reads and increase cluster availability.

Compute and storage scale independently. It is possible to scale reads by deploying additional replicas. Scalability and storage are scalable up-to 64TB. DocumentDB automatically adds 10GB whenever it reaches capacity.

DocumentDB is also able to automatically fail over to a read replica in the event of a failure–typically in less than 30 seconds. Currently Amazon DocumentDB doesn’t support any kind of multi-region setup.

Amazon DocumentDB does not rely on replicating data to multiple instances to achieve durability, data is durable whether it contains a single instance or 15 instances.
All writes are processed by the primary instance that executes a durable write to the cluster volume. It then replicates the state of that write (not the data) to each active replica. Writes to an Amazon DocumentDB cluster are atomic within a single document.

Consistency

Reads from Amazon DocumentDB replicas are eventually consistent with minimal replica lag (AWS says usually less than 100 milliseconds) after the primary instance writes the data:

  • reads from an Amazon DocumentDB cluster’s primary instance have read-after-write consistency
  • reads from a read replica have eventual consistency

It is possible to modify the read consistency level by specifying the read preference for the request or connection (it supports all MongoDB read preferences):

  • primary: reads are always routed to the primary instance
  • primaryPreferred: routes reads to the primary instance under normal operation, in case of failover a replica is used
  • secondary: reads are only routed to a replica, never the primary instance
  • secondaryPreferred: reads are routed to a read replica when one or more replicas are active. If there are no active replica instances in a cluster, the read request is routed to the primary instance
  • nearest: read preference routes reads based solely on the measured latency between the client and all instances in the Amazon DocumentDB cluster

Operations

It is possible to create an AWS DocumentDB cluster using CloudFormation stack (as described here).

Amazon DocumentDB is a fully managed solution that provides the following features:

  • auto scaling storage (up to 64 TB in 10GB increments)
  • simple compute resource scaling (resources allocated to an instance can be modified by changing instance class)
  • built-in monitoring, fault detection, and failover
  • daily snapshots.
  • An Amazon DocumentDB cluster decouples storage and compute.
  • A cluster consists of Cluster volume and Instances
    • Cluster volume refers to the storage layer that spans multiple Availability Zones. Each Availability Zone has a copy of the cluster data.
    • Instances refers to the compute layer. It provides the processing power needed for the database to write data to, and read data from, the cluster volume. 
  • Amazon DocumentDB Endpoints
    • Cluster endpoint
      • Connects to cluster’s current primary instance.
      • Can be used for both read and write operations.
    • Reader endpoint
      • Connects to one of the available replicas of the cluster.
      • Use for read operations only.
      • If the cluster has more than one replica, the reader endpoint will direct each request to DocumentDB replicas.
    • Instance endpoint
      • Connects to a specific instance in the cluster.
      • Use for specialized workloads that will only affect specific replica instances.

Performance

  • Provides millions of requests per second with millisecond latency and has twice the throughput of MongoDb.

Scaling

  • The minimum storage is 10GB. The Amazon DocumentDB storage will automatically scale up to 64 TB in 10 GB increments without affecting performance.
  • The Amazon DocumentDB cluster can be scaled by modifying the instance class for each instance in the cluster.
  • You can create up to 15 Amazon DocumentDB replicas in the cluster.
  • The replication lag is usually less than 100 milliseconds after the primary instance has written an update.

Reliability

  • The cluster volume provides durability by maintaining six copies of all data across three Availability Zones.
  • Amazon DocumentDB uses asynchronous replication to update the changes made to the primary instance to all of DocumentDB’s read replicas.
  • In most cases, the DocumentDB’s restart time is less than a minute after a database crash.
  • DocumentDB replicas can act as a failover target with no data loss.
  • Supports automatic failover.
  • Supports promotion priority within a cluster. Amazon DocumentDB will promote the replica with the highest priority tier to primary when the primary instance fails.
  • To increase the cluster’s availability, create replicas in multiple Availability Zones. The Amazon DocumentDB will automatically include the replicas when selecting for a failover target in the event of an instance failure.

Backup And Restore

 

Cluster Volume

Local Storage

STORED DATA TYPE

Persistent data

Temporary data

SCALABILITY

Automatically scales out when more space is required

Limited to the DB Instance class

  • Automated backups are always enabled.
  • Supports Point-In-Time restoration, which can be up to 5 minutes in the past.
  • You can restore from a cluster snapshot.
  • Supports sharing of encrypted manual snapshots.
  • Supports cross-region snapshot copying.

Security

  • You can authenticate a connection to a DocumentDB database through standard MongoDb tools with Salted Challenge Response Authentication Mechanism (SCRAM).
  • You can authenticate and authorize the use of DocumentDB management APIs through the use of IAM users, roles, and policies.
  • Data in transit is encrypted using Transport Layer Security (TLS).
  • Data at rest is encrypted using keys you manage through AWS KMS.
  • Amazon DocumentDB supports role based access control ( RBAC ) with built-in roles to enforce the principle of least privileged access.

Pricing

  • You are billed based on four categories
    • On-demand instances
      • Pricing per second with a 10-minute minimum
    • Database I/O
      • Pricing per million I/Os
    • Database Storage
      • Pricing per GB/month
    • Backup Storage
      • Pricing per GB/month