Design for Scalability

A scalable system provides elasticity. The ability to automatically add and remove resources enables resources to more closely match the current demand at any given point in time.

Scale Cloud Resources to Meet Your Workload Requirements

Enterprise Architect, Cloud Architect, Infrastructure Lead

Identify the compute and storage resources required by different levels of usage of the workload. You can add resources by either horizontal scaling (scale-out) or vertical scaling (scale-up).
  • Horizontal scaling mean adding more compute instances for your workload. This is much more cost efficient and provides better high availability than vertical scaling. Most applications that are stateless are best suited for horizontal scaling, where sessions are stored in centralized datastores (database, persistent cache like redis) instead of on the compute instances.
  • Vertical scaling means adding more OCPU cores to your compute instance. For example, changing Oracle Cloud Infrastructure Compute or database instances to a larger shape.

Some resources are fully elastic, some resources are scaled automatically natively, others support scaling through an API that you can use to automate scaling. Identify resources that can automatically scale and use them for scaling your workloads consumption. If your workload permits, choosing a service that scales automatically can radically decrease the operational complexity of an environment.

The following Oracle Cloud Infrastructureservices support scaling:

  • Oracle Cloud Infrastructure Object Storage

    Provides an internet-scale, high-performance storage platform that offers reliable and cost-efficient data durability. The Object Storage service can store an unlimited amount of unstructured data of any content type, including analytic data and rich content, like images and videos. Object Storage offers multiple management interfaces that let you easily manage storage at scale. The elasticity of the platform lets you start small and scale seamlessly, without experiencing any degradation in performance or service reliability. It is a regional service.

  • Oracle Cloud Infrastructure File Storage

    Is an elastic scalable file system supporting from kilobytes of data to petabytes.

  • Oracle Cloud Infrastructure Compute Autoscaling

    Enables you to automatically adjust the number of Compute instances in an instance pool based on performance metrics such as CPU utilization. This helps you provide consistent performance for your end users during periods of high demand, and helps you reduce your costs during periods of low demand. You select a performance metric to monitor, and set thresholds that the performance metric must reach to trigger an autoscaling event. When system usage meets a threshold, autoscaling dynamically allocates resources in near-real time. As load increases, instances are automatically provisioned: the instance pool scales out. As load decreases, instances are automatically removed: the instance pool scales in.

  • Oracle Cloud Infrastructure Compute Shapes

    You can use the API to adjust the shape of an instance. Standard shapes allocate CPU and memory in increments, and flexible shapes allow any CPU configuration from 1 CPU to 64 CPUs. You can use the Oracle Cloud Infrastructure Monitoring service to monitor VM metrics and raise an alarm when a particular metric is met. The alarm notification can call a function to adjust the shape of the VM, as needed.

    Note:

    Scaling a VM instance will cause a reboot.
  • Oracle Cloud Infrastructure Functions

    Oracle Cloud Infrastructure Functions provides a fully managed, highly scalable, on-demand, Functions-as-a-Service platform, built on enterprise-grade Oracle Cloud Infrastructure and powered by the Fn Project open source engine. Use Oracle Cloud Infrastructure Functions when you want to focus on writing code to meet business needs. You don't have to worry about the underlying infrastructure because Oracle Cloud Infrastructure Functions will ensure your application is highly-available, scalable, secure, and monitored. You can deploy your code, call it directly or trigger it in response to events, and get billed only for the resources consumed during the execution.

  • Oracle Cloud Infrastructure Load Balancing services

    A load balancer can have its bandwidth dynamically changed when required. You can use the API to automate this scaling.

  • Autonomous Database

    The autonomous database allows you to scale CPU or storage up or down without system impact. You can use the API to automate scaling. Optionally, Autonomous Database provides autoscaling up to three times the OCPU, which allows for automatically scaling without calling a separate API.

  • Virtual Machine Database Systems

    The VM DB system allows you to change the shape of a VM DB system up or down. You can use the API to automate this scaling. You can also scale a VM DB System's storage online, and Oracle provides the Oracle Dynamic Scaling utility.

    Note:

    Changing the shape of a VM DB system causes it to restart. For multi-node VM DB systems, this is done in a rolling fashion to maintain availability for the service. Be sure to configure Drain Timeout on your application services to configure the time the scale operations waits for a scale operation before server sessions are drained.
  • Oracle Exadata Database Service

    Oracle Exadata Database Service allows you to scale CPU up or down for existing nodes without any downtime. The X8M or newer versions allow you to add database and storage nodes to the cluster to increase CPU, storage, or both. You can use the API or the Oracle Dynamic Scaling utility to automate this scaling.

Distribute Your Traffic Across Availability Domains and Regions

Enterprise Architect, Cloud Architect, Infrastructure Lead

Use load balancing, DNS, and traffic management steering policies to distribute your traffic across multiple availability domains and regions.

Use the following services to distribute traffic across multiple availability domains and regions:

  • Oracle Cloud Infrastructure Domain Name System (DNS)

    The Oracle Cloud Infrastructure Domain Name System (DNS) service lets you create and manage your DNS zones. You can create zones, add records to zones, and allow Oracle Cloud Infrastructure's edge network to handle your domain's DNS queries.

  • Oracle Cloud Infrastructure Traffic Management Steering Policies

    The Oracle Cloud Infrastructure Traffic Management Steering Policies service helps you to guide traffic to your endpoints based on various conditions, including endpoint health and the geographic origins of DNS requests.

    You can configure policies to serve intelligent responses to DNS queries, meaning different answers (endpoints) may be served for the query depending on the logic the customer defines in the policy. Traffic Management Steering Policies can account for health of answers to provide failover capabilities, provide the ability to load balance traffic across multiple resources, and account for the location where the query was initiated to provide a simple, flexible and powerful mechanism to efficiently steer DNS traffic.

  • Oracle Cloud Infrastructure Load Balancing

    The Oracle Cloud Infrastructure Load Balancing service automates traffic distribution from one entry point to multiple servers reachable from your virtual cloud network (VCN).

    The service offers a load balancer with your choice of a public or private IP address, and provisioned bandwidth. A load balancer improves resource utilization, facilitates scaling, and helps ensure high availability. You can configure multiple load balancing policies and application-specific health checks to ensure that the load balancer directs traffic only to healthy instances. The load balancer can reduce your maintenance window by draining traffic from an unhealthy application server before you remove it from service for maintenance.

Perform Load Tests

Cloud Architect, Infrastructure Lead, Application Developer

Adopt a load testing methodology to measure if scaling activity will meet your application requirements. Perform regular load tests on your application to validate your scaling methods. Ensure that the test cases are reflective of real user traffic, if possible, as artificial tests may provide a false sense of confidence.