Set up Autonomous Data Warehouse and Autonomous Transaction Processing database autoscaling using OCI cloud native services

August 10, 2023 | 2 minute read
Lovelesh Saxena
Engineering Architect
Text Size 100%:

Setting up autoscaling is part of and a requirement of every team who hosts their applications on the cloud. When thinking on autoscaling for cloud infrastructure, two major components come to mind: Compute instances and database instances. Scaling Compute instances is comparatively easy, and Oracle Cloud Infrastructure (OCI) offers cloud native services that you can use to set up autoscaling. But when we think about database instances like Autonomous Data Warehouse or Autonomous Transaction Processing, the setup gets much less easy and direct. 

In this blog, we look into on how we can configure the autoscaling for database instances using OCI cloud native technologies. Our use case triggers autoscaling for scaling both down and up operations based on user session count. You can apply the same logic to other query parameters and metrics. We even have a tutorial to show you how to do it!

Solution overview

The solution uses the OCI Notification service with alarms configured on specific metrics. When the specific trigger condition are met, such as when user counts are more than 200, Notifications is triggered, which invokes the function. In this function, the code to automatically scale the database instance runs. For detailed steps about setting up the infrastructure, see our tutorial on the Learning page. You can download the Oracle Function code from GitHub.

A graphic depicting the architecture for the solution.

OCI services used in this solution

OCI Functions is a fully managed, multitenant, highly scalable, on-demand, functions-as-a-service platform. To learn more about Oracle Functions, see the documentation.

OCI Monitoring actively and passively monitors cloud resources using the Metrics and Alarms features. The Monitoring service uses metrics to monitor resources and alarms to notify you when these metrics meet alarm-specified triggers. Metrics are emitted to Monitoring as raw data points, or timestamp-value pairs, along with dimensions and metadata. To learn more about Oracle Monitoring, see the documentation.

OCI Notifications sets up communication channels for publishing messages using topics and subscriptions and lets you know when something happens with your resources in OCI. Using alarms, event rules, and connectors, you can get easily readable messages through supported endpoints, including email and text messages (SMS). You can also automate tasks through custom HTTPS endpoints and OCI Functions and directly publish messages. To learn more about Oracle Notifications, see the documentation.

Learn more about database autoscaling

For detailed steps about Autonomous Data Warehouse and Autonomous Transaction Processing database autoscaling using Oracle Cloud Infrastructure cloud native services, visit our tutorial on the Learning page. For an inside look at Cloud Customers Successes, visit the Oracle Customers Page.

Lovelesh Saxena

Engineering Architect

Previous Post

Enabling financial services industry analysis with TIBCO DataSynapse GridServer on OCI

Martin Feyereisen | 2 min read

Next Post

Moving Java Forward at Oracle CloudWorld 2023

Sharat Chander | 6 min read