July 15, 2021 By Vidyasagar Machupalli
Dimitri Prosper
4 min read

Learn how to configure and scale isolated workloads in shared and dedicated environments on Virtual Private Cloud.

Following the step-by-step instructions provided in this new solution tutorial, you will provision an IBM Cloud Virtual Private Cloud (VPC) with subnets spanning multiple availability zones (AZs) and virtual server instances (VSIs) that can scale according to your requirements to ensure the high availability of your application. Furthermore, configure load balancers to provide high availability between zones within one region. Configure Virtual Private Endpoints (VPE) for your VPC providing private routes to services on the IBM Cloud.

Isolate workloads by provisioning a dedicated host, attaching an encrypted data volume to a VSI and resizing the VSI after the fact. 

You will provision all of these services and VPC resources using IBM Cloud Schematics, which provides Terraform-as-a-Service capabilities. The Terraform template defines the IBM Cloud resources to be created, updated or deleted.

For the Terraform scripts and modules used in this tutorial, check the Git repo.

Auto scale on VPC 

With Auto Scale for VPC, you can improve performance and costs by dynamically creating virtual server instances (VSIs) to meet the demands of your environment. You set scaling policies that define your desired average utilization for metrics like CPU, memory and network usage. You can create an instance group in your IBM Cloud VPC to auto scale according to your requirements by using the IBM Cloud console. Based on the target utilization metrics that you define, the instance group can dynamically add or remove instances to achieve your specified instance availability.

Dedicated hosts on VPC

The reason you create a dedicated host is to carve out a single-tenant compute node — free from users outside of your organization. Within that dedicated space, you can create virtual server instances according to your needs. Additionally, you can create dedicated host groups that contain dedicated hosts for a specific purpose. Because a dedicated host is a single-tenant space, only users within your account that have the required permissions can create instances on the host.


  1. The frontend app deployed on VSI(s) communicates to the backend app via the private load balancer.
  2. The backend app securely communicates with the cloud services via a virtual private endpoint (VPE).
  3. As the load on the application increases, scaling for VPC is enabled and dynamically adds or removes VSIs based on metrics like CPU, RAM, etc. or through scheduled scaling.
  4. As the scope expands, the dedicated host isolates and performs heavy computation on the data. Resize the instance on the dedicated host by updating the profile based on your requirement.
  5. All instances communicate with IBM Cloud services over the private backbone using a virtual private endpoint (VPE). See the About virtual private endpoint gateways topic for more details.


VPC uses cloud-init technology to configure virtual server instances. The user data field on the new virtual server for VPC page allows users to put in custom configuration options by using cloud-init.

The application that you will be deploying via user-data is a simple balance form app that shows which services or virtual server instance are responding to a submission (request). The frontend instance runs an Nginx server to serve a PHP web application that talks to the backend to store and retrieve data. The backend instance runs a NodeJS and GraphQL API wrapper for IBM Cloud Databases for PostgreSQL and IBM Cloud Object Storage.

Provision using the IBM Cloud Schematics UI

Follow the step-by-step instructions in the solution tutorial to provision the cloud services and VPC resources and deploy the frontend and backend applications using the IBM Cloud Schematics UI.

What’s next?

Explore other VPC scenarios

There are additional scenarios in VPC tutorials

Questions and feedback

If you have feedback, suggestions or questions about this post, please reach out to us on Twitter or LinkedIn @VidyasagarMSC or Dimitri Prosper. Use the Open doc issue on the tutorial to report a problem on its content. If you see any issue with the Terraform scripts, open an issue here. 

Was this article helpful?

More from Cloud

Enhance your data security posture with a no-code approach to application-level encryption

4 min read - Data is the lifeblood of every organization. As your organization’s data footprint expands across the clouds and between your own business lines to drive value, it is essential to secure data at all stages of the cloud adoption and throughout the data lifecycle. While there are different mechanisms available to encrypt data throughout its lifecycle (in transit, at rest and in use), application-level encryption (ALE) provides an additional layer of protection by encrypting data at its source. ALE can enhance…

Attention new clients: exciting financial incentives for VMware Cloud Foundation on IBM Cloud

4 min read - New client specials: Get up to 50% off when you commit to a 1- or 3-year term contract on new VCF-as-a-Service offerings, plus an additional value of up to USD 200K in credits through 30 June 2025 when you migrate your VMware workloads to IBM Cloud®.1 Low starting prices: On-demand VCF-as-a-Service deployments begin under USD 200 per month.2 The IBM Cloud benefit: See the potential for a 201%3 return on investment (ROI) over 3 years with reduced downtime, cost and…

The history of the central processing unit (CPU)

10 min read - The central processing unit (CPU) is the computer’s brain. It handles the assignment and processing of tasks, in addition to functions that make a computer run. There’s no way to overstate the importance of the CPU to computing. Virtually all computer systems contain, at the least, some type of basic CPU. Regardless of whether they’re used in personal computers (PCs), laptops, tablets, smartphones or even in supercomputers whose output is so strong it must be measured in floating-point operations per…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters