10 min read

Learning Objectives

By the end of this module, you will be able to:

  • Choose between vertical and horizontal scaling per tier, using the live-resize boundaries of the platform
  • Design a VM Auto Scaling group: replica configuration, one metric policy, threshold gap, range, cooldown and step size
  • Explain why replica changes reach only new replicas, and plan the termination policy that rolls them out
  • Externalise session state so that a tier qualifies for horizontal scaling
  • Configure a live resize and an auto scaling group with a metric policy in the Data Center Designer (DCD)

Unit 4.3: Elasticity and VM Auto Scaling

Introduction

FinCorp's portal sees a steady weekday load, a month-end peak, and occasional campaign spikes. Two levers can follow that curve. Vertical scaling grows a running server; horizontal scaling adds and removes servers behind the balancer. IONOS CLOUD offers both, with different boundaries: live resize grows a server but shrinks it only with a restart, and VM Auto Scaling scales horizontally only, from a replica configuration whose changes reach only new replicas.

This unit decides which lever each tier uses, designs an auto scaling group that does not flap, and ends with both levers built in the DCD.

1. Vertical Scaling: Live Resize and Its Boundaries

1.1 What Moves Without a Restart

Live Vertical Scaling (LVS) changes the resources of a running Dedicated Core Server or vCPU Server. The following table shows what changes without a restart.

Direction Without restart Needs a restart or is not possible
Upscale CPU, RAM, NICs, storage volumes RAM beyond 240 GB: hotplugging is disabled, so the VM restarts every time RAM is increased
Downscale NICs, storage volumes (removing them) Fewer cores or less RAM: restart required. Storage size: cannot be reduced at all

As shown above, live resize is a one-way lever: you grow live and shrink in a window. Two conditions sit underneath it. The operating system must support it: Linux supports the full scope, while Windows supports CPU scaling but not RAM scaling, and Windows requires a reboot to scale beyond eight cores. And the image must declare it: the Scale CPU, Scale RAM, Hotplug NICs and Hotplug VirtIO properties of an image must be supported by the image, are preset for IONOS CLOUD images, and changing them on a provisioned storage device requires a restart.

1.2 When Vertical Is the Right Lever

Vertical scaling fits stateful tiers that cannot be cloned, such as FinCorp's data-tier servers, and tiers with a ceiling you can reach before the class limit of 62 cores (Unit 4.1). It does not remove a single point of failure, and the shrink back needs a restart, so it suits a peak you can schedule, not a spike you cannot. Cubes and Confidential VM are outside this lever: their CPU and RAM cannot change after provisioning.

2. Horizontal Scaling with VM Auto Scaling

2.1 Status and Scope

VM Auto Scaling is in the Early Access (EA) phase, and IONOS CLOUD recommends keeping usage and testing to non-production-critical applications. It scales horizontally only: it adds VMs of the same size and does not add cores or storage to individual VMs. A group is valid only within the VDC it belongs to, it manages only its own replicas, and deleting a group deletes all VMs associated with it. There is no charge for the service itself; you pay only for the resources the replicas use, within your contract's resource limits.

2.2 The Replica Configuration Is a Design-Time Decision

The replica configuration defines every new VM: CPU architecture, cores and RAM, NICs and their LANs, and volumes with an image or image alias. A password is mandatory for the image, and IONOS CLOUD recommends cloud-init for configuring replicas (Unit 4.2). You can clone the CPU architecture, cores and RAM from an existing VM in the VDC.

Changes to the replica configuration apply only to new replicas, never to the instances already running. To roll a change through the group, set the scale-in termination policy to delete the oldest replicas first, so that each scale-in removes a replica built from the old configuration. Raising cores or RAM in the replica configuration is the group's form of vertical scaling, and it reaches the fleet the same way.

2.3 One Metric Policy, Designed Against Flapping

Each group has exactly one metric policy. The metric is one of CPU utilization average, or network bytes or packets in or out. The policy's parameters are where flapping is prevented:

Parameter Platform rule Design use
Scale-in and scale-out thresholds Must differ by 40 percentage points Guarantees a dead band between adding and removing
Range The measurement period; not less than 120 seconds Smooths short spikes before a decision
Cooldown 2 minutes to 24 hours; 5 minutes if not specified Spaces actions; only one scaling action runs at a time, and the metric is re-evaluated after it completes
Amount per action Absolute or percentage, minimum 1; at most five VMs recommended Keeps scaling jobs within their performance envelope
Minimum and maximum count Minimum one replica; a maximum of 100 or fewer recommended The floor is always at least one running VM

As shown above, the platform builds hysteresis into the policy. Your part is choosing values that fit the boot time of a replica. A cooldown shorter than the time a new replica needs to boot, run cloud-init and pass the ALB health check measures the group before the new capacity counts.

The design is suited to a gradual increase in demand. Cooldown timers scale gradually rather than abruptly, so for a sudden, predictable rise in traffic, add VMs manually ahead of time.

2.4 Integration with the Application Load Balancer

A replica configuration can be associated with an ALB target group, so that new replicas join the group and receive traffic. The network must be defined first, because the ALB uses the IP addresses of the replica NICs; a group created with the default replica setup has no network, and the ALB is left without targets. Target weights range from 1 to 256, and mid-range values leave room for later adjustment. During EA, deleting a replica manually does not remove its IP address from the target group's targets list; remove it there first.

3. The Stateless Precondition

Horizontal scaling assumes any replica can serve any request and that any replica can be deleted. Termination policies delete whole VMs, and with the volume setting "Delete", their attached volumes. A tier that keeps sessions, uploads or caches on the instance loses them on every scale-in.

Externalise the state before you enable a group. DBaaS for In-Memory DB, a managed in-memory key-value store compatible with the Redis OSS API, holds sessions and shared cache entries outside the replicas; files go to IONOS Cloud Object Storage, and records to the database tier. In-Memory DB requires a maintenance window, during which short downtime can occur, so the session layer must reconnect cleanly. Unit 5.5 designs that tier.

FinCorp applies both levers by tier and by risk. Because VM Auto Scaling is in Early Access, the production portal in fc-prod-fra-core keeps a fixed pair, sized for the month-end peak and grown live when needed. The staging portal in the non-production contract runs as an auto scaling group behind its own ALB, with sessions in In-Memory DB, so that the team proves the replica image, the policy values and the rollout through oldest-first termination before the pattern is considered for production.

DCD Implementation Walkthrough

You will perform a live CPU upscale on a production portal server, then build the staging auto scaling group. This realises both levers from the design above.

Prerequisites: fc-app-01 with its boot volume from Unit 4.2; a staging VDC in the non-production contract with a private LAN and an ALB with a target group, built as in Unit 3.3; a Linux image and cloud-config document for the replicas.

Build goal: Configure an auto-scaling group with a metric policy and a live resize.

Steps (in the Data Center Designer):

  1. Live resize. In fc-prod-fra-core, select fc-app-01 and increase Cores in the Inspector pane. Select PROVISION CHANGES and confirm. The server keeps running; record the change in the capacity log, because shrinking it later needs a restart.
  2. Open the manager. Go to Menu > Network Services > Auto Scaling and select Create.
  3. Group. In the Autoscaling Setup tab, enter a Name, select the staging VDC as Data Center, set Minimum Count to 2 and a Maximum Count within your contract limits.
  4. Thresholds. Select the CPU utilization average Metric. Set Scale In Threshold and Scale Out Threshold at least 40 points apart, for example 25 and 70, and a Range of at least 120 seconds.
  5. Scale-in policy. Choose Amount Type Absolute and an Amount of 1. Set a Cooldown Period longer than a replica's boot and health-check time. Set Termination Policy to the oldest replica first, and Delete attached volumes to Delete for stateless replicas.
  6. Scale-out policy. Choose an Amount of at most five and the same cooldown discipline.
  7. Replica settings. In the Replica Configuration tab, use Clone Settings and Volumes to copy CPU architecture, cores and RAM from a staging VM, or set them with the sliders.
  8. Replica network. In Network, select +Add, name the NIC, select DHCP and associate the private LAN.
  9. Replica volumes and ALB. Add a volume with a storage type and size, select the Image, set the mandatory Password, select the SSH key, and add the Cloud-Init User Data. Then select the ALB Target Group, the Port and a mid-range Weight.
  10. Select Create. Check the Servers tab for the minimum replicas and the Jobs tab for the scaling actions.

Common mistakes:

  • Running a production critical tier on VM Auto Scaling while it is in Early Access.
  • Creating the group with the default replica setup. It has no network, so the ALB has no targets.
  • Editing the replica configuration and expecting running replicas to change. Only new replicas use it.
  • Setting a cooldown shorter than the replica boot and health-check time, which adds capacity faster than it can count.
  • Deleting replicas by hand without removing their IP addresses from the target group first.
  • Keeping sessions on the replicas, which every scale-in discards.

Summary

Vertical and horizontal scaling answer different needs. Live resize grows a running server across CPU, RAM, NICs and storage, but shrinking cores or RAM needs a restart, so it suits stateful tiers and scheduled peaks. VM Auto Scaling adds and removes whole replicas from a configuration fixed at design time, under one metric policy whose 40-point gap, range and cooldown prevent flapping. It is in Early Access, it needs stateless replicas, and its changes reach the fleet only through new replicas.

Key Points:

  • Live resize grows CPU, RAM, NICs and storage without a restart; fewer cores or less RAM need a restart, and storage never shrinks.
  • RAM hotplugging is disabled above 240 GB, and Windows does not support RAM scaling.
  • VM Auto Scaling is horizontal only, in Early Access, and recommended for non-production-critical applications.
  • One metric policy per group, thresholds 40 points apart, a range of at least 120 seconds, and a cooldown of 2 minutes to 24 hours.
  • Replica configuration changes apply only to new replicas; terminate oldest first to roll them out.

Important Terminology:

  • Replica configuration: the template from which VM Auto Scaling creates every new VM of a group.
  • Cooldown period: the interval between scaling actions of a group, which spaces decisions and prevents flapping.