AWS Certified SysOps Administrator - Associate Exam: Provisioning MongoDB on EC2 Instance

Which EBS Volume Type to Use for MongoDB Database on EC2 Instance?

Question

You work as a SysOps Administrator for a company.

The company wants to deploy a MongoDB database that will be heavily used by an application.

The database needs to be hosted on an EC2 Instance.

You need to provision the environment.

Which of the following EBS volume type would you use for the EBS volumes for the underlying Instance?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: B.

The AWS Documentation mentions the following.

In this, it mentions clearly what should be the volume type to be used.

For more information on EBS volume types, please refer to the below URL.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
Volume Type

Description

Use Cases

Solid-State Drives (SSD)

General Purpose SSD
(gp2)*

General purpose SSD
volume that balances
price and performance
for a wide variety of
workloads

« Recommended for
most workloads

* System boot
volumes

¢ Virtual desktops

* Low-latency
interactive apps

* Development and
test environments

Provisioned IOPS SSD (io1)

Highest-performance SSD
volume for mission-critical low-
latency or high-throughput
workloads

* Critical business applications
that require sustained IOPS
performance, or more than
10,000 IOPS or 160 MiB/s of
throughput per volume

* Large database workloads,
such as:

MongoDB

Cassandra

Microsoft SQL Server

MySQL

PostgreSQL

Oracle

© 00 0 Oo Oo

Hard disk Drives (HDD)
Throughput Cold HDD (sc1)
Optimized HDD
(st1)

Low cost HDD Lowest cost HDD

volume designed for volume designed
frequently accessed, for less frequently
throughput- accessed workloads
intensive workloads

° Streaming * Throughput-
workloads oriented storage
requiring for large volumes
consistent, fast of data that is
throughput at a infrequently
low price accessed

° Big data * Scenarios where

* Data warehouses the lowest

* Log processing storage cost is

* Cannot be a boot important
volume * Cannot be a boot

volume

When deploying a MongoDB database on an EC2 Instance, the choice of EBS volume type can have a significant impact on performance, availability, and cost.

Here's a brief overview of each EBS volume type:

A. General Purpose SSD (gp2): This is the default EBS volume type and is suitable for a wide range of workloads. It provides a balance of price and performance, with the ability to burst up to 3,000 IOPS per volume for short periods. However, it may not provide consistent performance for heavy workloads.

B. Provisioned IOPS SSD (io1): This EBS volume type is designed for high-performance database workloads that require consistent, low-latency I/O operations. It allows you to specify the number of IOPS you need, up to 64,000 per volume, and provides a guaranteed level of performance.

C. Throughput Optimized HDD (st1): This EBS volume type is designed for big data workloads that require high throughput, such as data warehouses, log processing, and MapReduce jobs. It provides high throughput at a low cost, but with higher latency than SSDs.

D. Cold HDD (sc1): This EBS volume type is designed for infrequent access workloads that require low-cost storage, such as backups and archival data. It provides low cost per GB, but with the lowest performance among all EBS volume types.

For a heavily used MongoDB database, the best EBS volume type would be Provisioned IOPS SSD (io1). This is because MongoDB workloads are often I/O intensive and require consistent, low-latency I/O operations. By specifying the number of IOPS needed, the io1 volume type ensures that the database has the necessary performance and reliability to handle heavy workloads.

General Purpose SSD (gp2) could also be used as an alternative, but it may not provide consistent performance for heavy workloads. Throughput Optimized HDD (st1) and Cold HDD (sc1) are not suitable for a MongoDB workload, as they provide lower performance and higher latency.