Organizations often choose to run their Oracle database workloads on managed services like Amazon Relational Database Service (Amazon RDS) for Oracle due to the numerous advantages they provide. A significant appeal of Amazon RDS for Oracle is the simplification of maintenance tasks for databases. Most maintenance activities—including operating system updates, database upgrades, storage scaling, and time zone file updates—are automated by Amazon RDS. This automation saves valuable time and resources that can be better spent on activities that directly contribute to your business’s success.
Similar to maintenance for on-premises Oracle databases, effective planning and testing are essential for maintenance activities in Amazon RDS to ensure seamless business operations. The Amazon RDS for Oracle User Guide offers in-depth information on maintenance tasks, but navigating the best practices for these tasks can be overwhelming. In this post, we will outline the key maintenance activities along with recommended best practices for each.
Maintenance Windows
Amazon RDS schedules maintenance to address security issues and enhance instance reliability. The maintenance window is a crucial period you can control for modifications to DB instances, database engine version upgrades, and software patching when necessary. During this window, Amazon RDS implements updates related to hardware, the underlying OS, or minor version upgrades of the database engine. Certain maintenance operations, such as OS updates and database patching, may result in downtime. It is advisable to set your maintenance windows during off-peak hours to reduce the impact on your applications. Notifications regarding scheduled maintenance activities are sent through various AWS channels, facilitating proactive planning and minimizing unexpected disruptions. The critical nature of OS updates, primarily driven by security needs, highlights the importance of keeping systems current.
If a maintenance event is planned for a given week, it will start during the 30-minute maintenance window you’ve designated. Most maintenance tasks will typically complete within this timeframe; however, larger operations may require more than 30 minutes.
You might find it necessary to adjust your current maintenance window or postpone maintenance actions to lessen the impact on your applications. Modifying the maintenance window does not require downtime. However, if there are pending actions that necessitate downtime and the maintenance window is adjusted to include the current time, those actions will be executed immediately, resulting in downtime. You cannot defer maintenance actions that have already begun, but you can postpone those slated for the upcoming maintenance window.
It is also vital to differentiate between pending modifications and pending maintenance. Pending modifications refer to changes deferred to the next maintenance window, which were manually requested through the modify-db-instance API or console without the –apply-immediately option. Conversely, pending maintenance refers to actions suggested by RDS automation that were not manually initiated by an API call.
To monitor pending maintenance events for your RDS DB instances, check the Events page on the Amazon RDS console. Additionally, you can identify engine-specific maintenance events using the AWS Command Line Interface (AWS CLI) with commands like describe-pending-maintenance-actions
or the Amazon RDS API for DescribeDBInstances
. For further details, see Viewing pending maintenance updates.
Infrastructure Maintenance
AWS routinely conducts scheduled maintenance with minimal disruption to RDS instances. These scheduled events are initiated by AWS for planned maintenance, including stops and reboots. Occasionally, they may be necessary due to detected hardware degradation or to retire older hardware. In rare cases, network maintenance events may occur. Prior to scheduling maintenance, you will receive an email notification detailing the time and affected availability zones (AZs). If you are informed of hardware maintenance, it is advisable to restart your instance during the maintenance window to prevent planned maintenance from escalating into unplanned downtime. For Single-AZ deployments, you can expect a brief period of unavailability, typically lasting a few minutes. In Multi-AZ deployments, if an AZ is affected, your instance may be unavailable for approximately 60–120 seconds during the failover process. If only the secondary AZ is impacted, there will be no failover or downtime.
Should maintenance be scheduled for the primary instance in a multi-AZ setup, you can execute a manual failover. This process allows the primary instance to become the standby, undergoing maintenance at a later date. To review your DB instances set to receive hardware maintenance during your maintenance window, consult the Open and recent issues tab on your AWS Health Dashboard. More information can be found in the maintenance notification email sent to your account.
Scaling the Instance Class
You have the option to modify the RDS instance to adjust its class or size based on the dynamic resource needs of your workload. Most modifications can be applied immediately or deferred until the next maintenance window. Changing the DB instance class does involve some downtime. However, in a Multi-AZ environment, this downtime is minimal since the standby instance is scaled first, followed by a failover to the newly sized database, and finally the previous primary instance is scaled. The failover process usually lasts around 60–120 seconds. It’s essential to note that after scaling, the multi-AZ instance will operate in a different AZ than where it was running when the modification was requested; if your workload is AZ-specific, a manual failover may be necessary post-scaling.
Conversely, a Single-AZ RDS instance will experience downtime during the scaling process, typically taking about 10 minutes to complete.
Amazon RDS manages default Oracle memory-related parameters during scaling activities; however, if you have custom memory allocations, it’s prudent to review those settings post-scaling. For example, if you have a parameter setting (such as db_16k_cache_size
) that conflicts with the resources available in the target instance class, the instance might enter an incompatible-parameters status during scaling.
Amazon RDS read replicas enhance performance and durability for RDS DB instances, enabling you to scale out beyond the limits of a single DB instance for read-heavy workloads. You can independently scale read replicas apart from the primary RDS instance. For more detailed guidance, refer to Scaling Your Amazon RDS Instance Vertically and Horizontally. This is another blog post you might find insightful.
For those looking to deepen their understanding of RDS maintenance, a comprehensive overview can be found at Chanci Turner’s blog, which serves as an excellent resource.
Lastly, if you’re interested in learning about emerging skills in the tech workforce, check out this article on Fast Company.
Leave a Reply