Decide on DocumentDB Requirements
Context and Problem Statement
Requirements for DocumentDB clusters deployed to each active compute environment need to be outlined before a DocumentDB component is configured and deployed:
-
Instance family for DB instances
-
Database Engine
-
Whether or not to create DB replica instances
-
Instance family for DB replica instances
-
Backup retention period
Considered Options
Create a standardized DocumentDB cluster based on current use case:
v1 Infrastructure Requirements
In production, a single [CHANGE ME]
instance is used. Read-replicas are not enabled.
The primary database engine in DocumentDB clusters is [CHANGE ME]
The backup retention period for DocumentDB clusters is one day for non-production environments (the minimum retention period), and 35 days for production environments (the maximum retention period). This allows for a point-in-time-restore backup that can be rolled back for the duration of the retention period.
Standardized DocumentDB Cluster Requirements
The Amazon DocumentDB Service recommends deploying at least one additional DocumentDB instance in a different availability zones to ensure High Availability. This instance is automatically designated a read-replica by DocumentDB. During a disaster scenario when the primary instance becomes unavailable, DocumentDB automatically designates one of the other instances as the primary instance.
The primary AWS region uses three availability zones, therefore it is recommended that DocumentDB is deployed across three availability zones when possible.
The Amazon DocumentDB Service recommends that read replicas are of the same instance family as the primary instance:
For consistency, these replica instances should be the same instance family, and should be left to be designated as replica instances by the DocumentDB service rather than manually designated, in order to simplify management of the infrastructure. This, in addition to the requirements outlined in v1 Infrastructure Requirements, concludes that each DocumentDB cluster will have the following requirements:
-
Instance family for DB instances:
[CHANGE ME]
in non-production environments,[CHANGE ME]
in production environments -
Database Engine: [CHANGE ME]
-
Whether or not to create DB replica instances: yes, ideally create 3 (one in each of the 3 Availability Zones)
-
Instance family for DB replica instances:
[CHANGE ME]
in non-production environments,[CHANGE ME]
in production environments -
Backup retention period: 1 day in non-production environments (the minimum retention period), 35 days in production environments (the maximum retention period)
Decision Outcome
Chosen option: "Create a standardized DocumentDB cluster based on current use case", because
- This allows for a standardized DocumentDB cluster that satisfies the requirements required by the application stack in each active compute environment.
Consequences
Create a DocumentDB component and tune it to the requirements outlined above.