Amazon DocumentDB
Developer Guide

Managing Instance Classes

The instance class determines the computation and memory capacity of an Amazon DocumentDB (with MongoDB compatibility) instance. The instance class you need depends on your processing power and memory requirements.

Amazon DocumentDB supports the R4 and R5 families of instance classes. These classes are current-generation instance classes that are optimized for memory-intensive applications. For the specifications on these classes, see Instance Class Specifications.

Determining an Instance's Class

To determine the class of an instance, you can use the AWS Management Console or the describe-db-instances AWS CLI operation.

Using the AWS Management Console

You can use the console to determine what the instance class is for your cluster's instances.

To determine the instance classes for your cluster

  1. Sign in to the AWS Management Console, and open the Amazon DocumentDB console at https://console.aws.amazon.com/docdb.

  2. To find the instance that you're interested in, choose Instances in the navigation pane.

  3. In the list of instances, find the instance that you want. Then look at the Class column of the instance's row.

    In the following image, the instance class for instance docdb-2019-05-13-20-51-52 is db.r5.4xlarge.

    
                        Screen shot showing a list of instances with their instance types.
Using the AWS CLI
  • --db-instance-identifier—Optional. Specifies the instance that you want to find the instance class for. If it is omitted, describe-db-instances returns a description for up to 100 of your instances.

  • --query—Optional. Specifies the members of the instance to include in the results. If it is omitted, all members are returned.

The following example finds the instance name and class for all instances.

For Linux, macOS, or Unix:

aws docdb describe-db-instances \ --query 'DBInstances[*].[DBInstanceIdentifier,DBInstanceClass]'

For Windows:

aws docdb describe-db-instances ^ --query 'DBInstances[*].[DBInstanceIdentifier,DBInstanceClass]'

Output from this operation looks something like the following (JSON format).

[ [ "docdb-2019-05-13-20-51-24", "db.r5.large" ], [ "docdb-2019-05-13-20-51-242", "db.r5.large" ], [ "docdb-2019-05-13-20-51-52", "db.r5.4xlarge" ], [ "docdb-2019-05-13-20-51-522", "db.r5.4xlarge" ] ]

For more information, see Describing Amazon DocumentDB Instances.

Changing an Instance's Class

You can change the instance class of your instance using the AWS Management Console or the AWS CLI. For more information, see Modifying an Amazon DocumentDB Instance.

Supported Instance Classes by Region

Amazon DocumentDB supports the following instance classes:

  • R5—Current generation memory-optimized

  • R4—Current generation memory-optimized

For detailed specifications on the instance classes, see Instance Class Specifications.

A particular instance class may or may not be supported in a given region. The following table specifies which instance classes are supported by Amazon DocumentDB in each region.

Supported instance classes by Region

Instance Classes
Region R5 R4

US East (Ohio)

Supported

Supported

US East (N. Virginia)

Supported

Supported

US West (Oregon)

Supported

Supported

Asia Pacific (Seoul)

Supported

Asia Pacific (Sydney)

Supported

Asia Pacific (Tokyo)

Supported

EU (Frankfurt)

Supported

EU (Ireland)

Supported

Supported

EU (London)

Supported

Instance Class Specifications

The following table provides details of the Amazon DocumentDB instance classes. You can find explanations for each table column below the table.

Supported Amazon DocumentDB instance classes

Instance class vCPU1 ECU2 Memory (GiB)3 Max. bandwidth (Mbps)4 Network performance5
R5 – Current Generation Memory-Optimized Instance Class
db.r5.large 2 10 16 Up to 3,500 Up to 10 Gbps
db.r5.xlarge 4 19 32 Up to 3,500 Up to 10 Gbps
db.r5.2xlarge 8 38 64 Up to 3,500 Up to 10 Gbps
db.r5.4xlarge 16 71 128 3,500 Up to 10 Gbps
db.r5.12xlarge 48 173 384 7,000 10 Gbps
db.r5.24xlarge 96 347 768 14,000 25 Gbps
R4 – Current Generation Memory-Optimized Instance Class
db.r4.large 2 7 15.25 437 Up to 10 Gbps
db.r4.xlarge 4 13.5 30.5 875 Up to 10 Gbps
db.r4.2xlarge 8 27 61 875 Up to 10 Gbps
db.r4.4xlarge 16 53 122 875 Up to 10 Gbps
db.r4.8xlarge 32 99 244 875 10 Gbps
db.r4.16xlarge 64 195 488 14,000 25 Gbps
  1. vCPU—The number of virtual central processing units (CPUs). A virtual CPU is a unit of capacity that you can use to compare instance classes. Instead of purchasing or leasing a particular processor to use for several months or years, you are renting capacity by the hour. Our goal is to provide a consistent amount of CPU capacity no matter what the actual underlying hardware.

  2. ECU—The relative measure of the integer processing power of an Amazon Elastic Compute Cloud (Amazon EC2) instance. To make it easier for developers to compare the CPU capacity between different instance classes, we defined an Amazon EC2 compute unit. The amount of CPU that is allocated to a particular instance is expressed in terms of these EC2 compute units (ECUs). One ECU currently provides CPU capacity equivalent to a 1.0–1.2 GHz 2007 Opteron or 2007 Xeon processor.

  3. Memory (GiB)—The RAM, in gigabytes, that is allocated to the instance. There is often a consistent ratio between memory and vCPU.

  4. Max. bandwidth (Mbps) - The maximum bandwidth in megabits per second. Divide by 8 to get the expected throughput in megabytes per second.

  5. Network performance—The network speed relative to other instance classes.