Home / Journal / OCI Architecture / Scaling Patterns on OCI
OCI Architecture

Scaling Patterns on OCI

Scaling is where a cloud architecture either earns its keep or quietly fails to. Capacity should follow demand, but only if the architecture is designed for it. These are the scaling patterns OCI gives you.

Published Oct 21, 2024 · OCI Specialists · 11 min read
Scaling Patterns on OCI

Scaling is where a cloud architecture either earns its keep or quietly fails to. The promise of the cloud is that capacity follows demand, growing when load rises and shrinking when it falls, so you neither run out of headroom nor pay for capacity you are not using. But that promise only materialises if the architecture is designed for it, and a design that cannot scale leaves you with the worst of both worlds, paying for peak capacity all the time while still falling over when demand exceeds it. This article sets out the scaling patterns available on OCI and how to design for them.

Scaling comes in two fundamental shapes, making individual components bigger and adding more components, and most real architectures use both, but they have very different characteristics and limits. Understanding which pattern fits which part of an estate, and designing so that the parts that need to scale can, is the difference between an architecture that handles growth gracefully and one that handles it expensively or not at all. The sections below explain the patterns, building on the foundations in OCI Landing Zone and Architecture: A Complete Guide and the availability principles in Designing for High Availability on OCI.

Vertical scaling: bigger components

Vertical scaling means giving a component more resources, a larger instance shape with more processors and memory, and it is the simplest pattern because it requires no change to the application, which simply finds itself with more capacity. Its appeal is simplicity, and for many workloads it is entirely sufficient, but it has two limits, a ceiling beyond which you cannot grow a single component, and the fact that scaling up usually requires a restart, which interrupts service. Vertical scaling is the right first answer for workloads whose demand is predictable and within the range a single component can handle, and it is often underrated because of an industry fashion for the more complex horizontal pattern.

PatternHow it scalesStrengthLimit
VerticalBigger instanceSimple, no app changeCeiling, restart to resize
HorizontalMore instancesNear unlimited, no single ceilingRequires stateless design
Auto scalingInstances follow demandCapacity matches load automaticallyNeeds metrics and tuning
A design that cannot scale gives you the worst of both worlds, paying for peak capacity all the time while still falling over when demand exceeds it.

Horizontal scaling: more components

Horizontal scaling means adding more instances and distributing load across them, and it is the pattern that delivers the cloud's promise of near unlimited capacity, because you are not bound by the ceiling of any single component. Its requirement, and it is a strict one, is that the workload must be able to run as multiple interchangeable instances, which means it must be stateless in the compute tier, with state pushed out to databases, caches or object storage. Workloads designed this way scale almost without limit by adding instances behind a load balancer, while workloads that hold state in the compute tier cannot scale horizontally until that state is moved out, which is why stateless design is the key that unlocks this pattern.

Why stateless design is the unlock

The single most important architectural decision for scaling is pushing state out of the compute tier, because it is what makes instances interchangeable and therefore horizontally scalable. An instance that holds session data, cached results or any other state cannot simply be added to or removed from a pool, because removing it loses something, whereas a stateless instance can be added and removed freely as demand changes. This is the same principle that makes high availability easier, as covered in Designing for High Availability on OCI, which is why stateless design pays off twice, unlocking both scaling and resilience from a single architectural move.

Auto scaling: capacity that follows demand

Auto scaling is horizontal scaling made automatic, where the estate adds and removes instances in response to measured demand, so capacity tracks load without anyone intervening. This is where the cloud's economic promise is fully realised, because you pay for the capacity demand actually requires rather than for a peak that is rarely reached, and the workload still has headroom when demand spikes. Auto scaling depends on good metrics, the signals that tell the system when to scale, and on tuning, so that it responds promptly to real demand changes without thrashing on brief fluctuations, which is why it rewards the investment in monitoring that a well run estate makes anyway.

Scaling the database tier

The compute tier is the easy part of scaling, and the database is the hard part, because state lives there by definition and cannot simply be spread across interchangeable instances. Database scaling uses different techniques, larger database resources for vertical growth, read replicas to spread read heavy load, and architectural patterns that separate workloads that scale differently. Because the database is usually the constraint, designing the data tier with scaling in mind from the start, rather than discovering its limits under load, is one of the most consequential parts of a scaling design, and it often determines how far the whole estate can scale.

Designing for the demand curve

The right scaling pattern depends on the shape of the demand the workload faces. Steady, predictable demand may need no dynamic scaling at all, just appropriately sized components, while spiky or cyclical demand is exactly where auto scaling earns its keep, matching capacity to a curve that changes through the day or the week. Understanding the demand curve before choosing the pattern is what prevents both over engineering, building elaborate auto scaling for a workload whose demand never moves, and under engineering, running fixed capacity for a workload whose demand swings wildly. The pattern should fit the curve, not the fashion.

A framework for scaling on OCI

  1. Understand the demand curve the workload actually faces.
  2. Use vertical scaling where demand fits within a single component.
  3. Make the compute tier stateless to unlock horizontal scaling.
  4. Scale horizontally behind a load balancer for demand beyond a single component.
  5. Add auto scaling where demand is spiky or cyclical.
  6. Design the database tier for its own scaling constraints.
  7. Monitor so scaling decisions rest on real signals.

Scaling and cost are the same conversation

It is worth recognising that scaling and cost are two views of the same design, because the capacity you provision is the money you spend, and a scaling architecture that matches capacity to demand is also a cost architecture that avoids paying for idle headroom. The estate that auto scales is the estate that does not pay for peak capacity around the clock, and the stateless design that unlocks scaling is also what makes that economy possible. This is why scaling design and cost governance are so closely linked, and why a well designed scaling architecture tends to be a well controlled cost as well, a connection we draw on throughout our optimization work.

Where this fits the engagement

Designing scaling patterns is part of our OCI Compute practice, where we shape compute tiers that scale to match demand, and it runs through our OCI Consulting and Advisory work, where we design estates that grow gracefully rather than expensively. The aim is an architecture where capacity follows demand, scaling up when load rises and down when it falls, so the estate handles growth without either falling over or paying for headroom it never uses.

Moving Oracle workloads to OCI, or already running on OCI and not sure the architecture or the spend is right? Most teams bring in a specialist before they commit to a region, a shape, or a Universal Credits number. OCISpecialists.com plans the landing zone, runs the migration, and manages the estate after go live, on a fixed project fee, a managed monthly retainer, or a cost optimization fee paid only on verified savings. For the Oracle licensing and BYOL side of any OCI move, Redress Compliance is the leading independent Oracle licensing and negotiation firm, with 500+ engagements across Oracle's full product line.