The latest cloud infrastructure announcements, technical solutions, and enterprise cloud insights.

Autoscaling a Load Balanced Web Application

Lawrence Gabriel
Solutions Architect

Automatic, horizontal scaling of web servers is an essential capability of the infrastructure behind any service that manages a variable amount of traffic. This post is the first in a four-part series that demonstrates how several of the over 120 features that Oracle Cloud Infrastructure has added in 2019 work together to enable a web application to scale based on changes in demand.

Let’s use a fictional online retailer, TheSmithStore, as an example. At the TheSmithStore, web traffic is low overnight and starts to increase at about 6 a.m. EST. Traffic trends up over the day and generally peaks at about 10 p.m. EST. On the weekend, traffic follows the same general pattern but is much heavier. Additionally, traffic is heavier during the holiday season than at other times of the year. Throughout the year, traffic at its peak is 20 times greater than at its lowest.

TheSmithStore Web Traffic

To handle the traffic variation on-premises, TheSmithStore would need to purchase and maintain the infrastructure required to serve their customers at peak traffic. But maintaining peak infrastructure is a tremendous waste of resources; most of the investment in people, compute, and networking equipment would be unused 300 days of the year. By moving this workload to Oracle Cloud Infrastructure, TheSmithStore costs would follow their traffic, and more importantly, their revenue. The same number of people required to maintain a fleet of 100 web servers can maintain 2000 web servers.


The primary Oracle Cloud Infrastructure components that help TheSmithStore respond to variable web traffic are the Load Balancing service, custom Compute images, and Compute autoscaling. Each post in this series focuses on one component of this configuration. The following diagram shows how TheSmithStore uses each Oracle Cloud Infrastructure component and how they interact with each other.

TheSmithStore Architecture

This blog series covers the following resources:

  • One load balancer
  • One custom Compute image
  • One instance configuration
  • One instance pool
  • One autoscaling configuration
  • Multiple Compute instances managed by autoscaling

This blog series does not cover the following resources in detail, but documentation links are provided:

  • One virtual cloud network
  • One regional public subnet with associated route table, internet gateway, and security list
  • One regional private subnet with associated route table, NAT gateway, and security list
  • (Optional) One bastion public subnet with associated route table, internet gateway, and security list
  • (Optional) One bastion compute instance for administrative access to the web servers

Series Overview

The rest of this blog series contains the following posts:

Load Balancing Service

Part 2, Preparing a Load Balancer for Instance Pools and Autoscaling, covers how TheSmithStore uses the Oracle Cloud Infrastructure Load Balancing service. This service provides a high availability (HA) endpoint for TheSmithStore website that makes it easy to run a web store that is always available to customers.

Custom Compute Image

Part 3, Designing Images for Compute Autoscaling, covers what TheSmithStore considers when building custom images. A well-designed custom Compute image can launch quickly and immediately take customer traffic.

Compute Autoscaling

Part 4, Using Compute Autoscaling with the Load Balancing Service, covers how TheSmithStore automatically scales their web server fleet. Compute autoscaling automatically adds or removes web servers to a load balancer based on customer-specified triggers. It ensures that enough capacity is available to serve TheSmithStore customers while also keeping costs low.

For an overview of instance configurations and instance pools, see Enhanced Compute Instance Management on Oracle Cloud Infrastructure.

For an overview of autoscaling, see Right-Size Your Workloads with Oracle Cloud Infrastructure Autoscaling.

Get Started

By using these Oracle Cloud Infrastructure components together, TheSmithStore can increase their availability and performance while eliminating idle resource costs. Go to Part 2 to get details on the Load Balancing service for TheSmithStore. You can follow along with the steps in this series with an Oracle Cloud Infrastructure free trial. If you don't already have an Oracle Cloud account, go to https://www.oracle.com/cloud/free/ to sign up today.

Join the discussion

Comments ( 1 )
  • Maurits Monday, November 4, 2019
    This is crazy. The cost of complexity does not outweigh the costs of the extra infrastructure needed to handle the peak load. Just rent a few heavy servers in your local datacenter and run your web shop there. My 2cts.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha