Hero Image

Autoscaling for Holiday Sales Traffic: When It Helps

In brief

  • Autoscaling adds or removes capacity when load crosses a threshold you set. On a sales day such as Black Friday or Boxing Day it follows the build-up through the day and the drop-off overnight. It does not catch a surge that is over in minutes, and it cannot fix a slow database or slow code.
  • Before a sale, check that your application runs as several copies and where it keeps uploads, sessions and caches. Then set your limits and add capacity before the start, because the first minutes can outrun any trigger.
  • On Enscale, dynamic resources are billed hourly for what you use, a ceiling caps your spend, and a load balancer can be added for you when you first scale an application server. For the case autoscaling can't fix, a busy database, there is preconfigured database clustering.

Illustrative chart of load from Black Friday to Cyber Monday, with a reserved baseline and dynamic peaks

A holiday sale starts, whether it's Black Friday, Boxing Day or a Mother's Day offer, and your site slows to a crawl just when the most customers are watching. Or you pay all year for servers sized for a few busy days. Autoscaling is the usual answer to both. It works well for the part of a sale you can see building, and less well for the part you can't.

Autoscaling is the automatic adding or removing of resources, or of whole servers, as the load on your site changes. Your hosting grows when your site is busy and shrinks when it's quiet, with nobody touching it.

The short answer: it helps when load builds and falls over hours, as it does across a sales weekend, an office day or a quiet weekend, and your application can run on more than one server. It does little when the problem is the database, slow code, or a surge that's over before a new server is ready. Below is how to set Enscale up before a sale, and then how its scaling works underneath.

Enscale is built on the Virtuozzo Application Platform, formerly known as Jelastic. Where we describe how scaling behaves, we link to that platform's documentation.

What Autoscaling Does

There are two kinds, and they solve different problems.

Vertical scaling Horizontal scaling
What changes The RAM and CPU one server can use The number of servers sharing the work
What your application needs Nothing beyond running on one server To work as several copies behind a load balancer
Helps with A server that needs more memory or CPU at busy times More simultaneous visitors than one server can handle

When people say "just turn on autoscaling", they usually mean the second kind, and that is where the conditions below apply.

What a Trigger Sees

A trigger doesn't react to the load itself. It reacts to the average of the last five minutes, checked once a minute. So when load jumps, the average climbs more slowly, and nothing happens until it crosses your threshold.

Say a sale starts and load jumps from 30% to 100% and stays there. The average goes 44%, 58%, then 72%. With a 65% threshold, the third check asks for a new node, three minutes after the jump. With the Customer Dashboard default of 80%, it takes four checks. And the new node still has to be created.

A trigger reacts to the average, which lags a sudden surge Load jumps from 30 to 100 percent and stays there. The 5-minute average climbs to 44, 58 and then 72 percent, crossing the 65 percent threshold on the third check, three minutes after the jump. 0% 50% 100% Threshold: 65% Node requested here Load jumps Load 5-minute average 0 5 10 15 20 Minutes

That gap is why the opening minutes of a sale are the risky moment, and why you prepare ahead of them.

Setting Up Enscale Before a Holiday Sale

A sale is a busy period you can see coming, so you can do the work that triggers can't do for you.

  1. Weeks before: make sure your application runs as several copies, and test it on a staging copy with two nodes. Check your database, and consider a cluster if it runs on a single node. Run a load test that arrives as a sudden spike, because a steady ramp hides how long new nodes take to arrive.
  2. A few days before: set the dynamic ceiling (the most resources a server may use) and the node cap (the most nodes a layer may have) for the peak you expect. Your last sale's peak is a good starting point. Changing the ceiling restarts the layer, so do it well ahead. Reserve the baseline you always use, and leave the peaks to dynamic cloudlets.
  3. Also a few days before: tune the triggers. The Customer Dashboard default adds a node above 80% for 5 minutes. For a sale, consider the platform documentation's 65% example so a new node starts earlier (a minute sooner in the example above). Keep the add threshold above 50% and at least 20 points above the remove threshold. A longer removal window, up to an hour, makes it less likely that capacity is removed during a lull between peaks.
  4. Shortly before the start: add nodes by hand in the topology wizard, the screen where you change an environment (documentation), so capacity is already running when the first customers arrive, and let triggers handle whatever comes above it.
  5. During the sale: keep the trigger's email notifications on, watch the usage graph, and check Monitoring > Events History to see what the triggers did.
  6. Afterwards: the remove condition brings the node count back down, and dynamic cloudlets stop being billed when they stop being used.

What Enscale Handles for You

Autoscaling alone doesn't cover every case. Here is what Enscale does about each problem, and where it stops.

The problem What Enscale does about it Where it stops
Paying for idle capacity Dynamic cloudlets are billed hourly for what is used, up to a ceiling you set Reserved cloudlets are billed whether or not they are used
One server is too small at peak Triggers add nodes, and an NGINX load balancer is added when you first scale a certified application server Your application has to run as several copies
A sale that starts faster than a trigger reacts Add nodes by hand and raise the dynamic ceiling before the start You have to do it ahead of time, because triggers can't see a sale coming
A busy database Preconfigured MariaDB, MySQL and Percona clusters, with a ProxySQL pair that sends writes to the primary and spreads reads across replicas, ready in about 10 minutes (how it works) Clustering doesn't make a slow query fast
A WordPress site that outgrows one server High-traffic WordPress hosting with horizontal scaling based on load and database clustering The same application checks apply, so test on a staging copy first
Not sure autoscaling will help A 14-day free trial, or a free consultation with our cloud architects Neither changes the limit on short spikes

What Your Application Needs First

Horizontal scaling gives you several copies of your application behind a load balancer. That only helps if any copy can answer any request. Before you rely on a trigger, check these.

  • It runs as several copies, tested on a staging copy with two nodes.
  • Nothing important lives on one node only. Uploaded files, session data and caches written to one server's disk or memory won't exist on the others. On Enscale, the first node of a layer can act as a storage server shared with the layer's other nodes (platform documentation).
  • A new node can start from a copy, so know your scaling mode (see Scaling Modes below).
  • Your database can take the extra load. Check it isn't already your bottleneck (more on this below).
  • Your limits are deliberate. That means the ceiling, the node cap, and a threshold you've compared against your own graph.

When Autoscaling Does Not Help

A short spike

A surge shorter than the window can pass without any node being added: if load jumps for two minutes and drops again, the five-minute average may never reach your threshold. When a trigger does fire, the new node still has to be created. The platform documentation gives no figure for how long that takes, so we don't either. Test it on your own site.

A busy database

More web nodes can send more queries at the same database, so if the database is the slow part, scaling the application layer can make things worse. A database cluster adds resilience and, for the right workloads, capacity, but a slow query stays slow because every node still runs it. Database Clustering and Failover in Enscale with Galera explains how Enscale builds clusters and what they do and don't fix. A database whose configuration has drifted away from its workload slows down in the same way, and adding resources only masks it. Why MariaDB performance gets slower over time in Enscale explains how to spot that.

Slow code

If every request is slow because of an unindexed query or a blocking call, ten servers give you ten slow servers. Fix the code first and scale second.

A hard ceiling

Both kinds of scaling stop at the limits you set. A layer can only grow to your node cap and the provider's per-layer limit.

How Vertical Scaling Works on Enscale

Enscale measures resources in cloudlets. One cloudlet is 128 MiB of RAM plus 400 MHz of CPU. For each server you choose two things:

  • Reserved cloudlets, the amount you expect to use. You pay for them whether or not you use them, at a lower rate.
  • Dynamic cloudlets, the headroom. The platform makes them available when load needs them, and you pay only for what is actually used.

The dynamic ceiling, called the scaling limit, is the most the server can grow to. This applies to any instance in an environment, including application servers, databases, load balancers and VPS nodes. According to the automatic vertical scaling documentation, resources are allocated immediately, with no delay or impact on the application.

One catch: changing the scaling limit on an existing application server, database or cache node restarts that layer. Choose the ceiling deliberately, not in the middle of an incident.

Say you set a ceiling of 16 dynamic cloudlets on an application server. That allows at most 2 GiB of RAM and 6.4 GHz of CPU. A server using all 16 for a full hour costs about £0.087, and about £64 if it ran flat out for a whole 730-hour month. That uses the 16-and-above rate of £0.00546 per cloudlet per hour (ex VAT, Manchester region, prices correct at 1 December 2026). The price per cloudlet falls as you use more of them across the environment. Disk above 10 GB and external traffic are billed separately.

At the lowest tier (£0.0055 against £0.00683 per hour ex VAT), a reserved cloudlet only works out cheaper if it is in use more than about 80% of the time. Reserve what you use almost constantly (the teal band in the chart at the top) and leave the peaks to dynamic cloudlets (the purple area).

How Horizontal Scaling Works on Enscale

Horizontal scaling changes the number of servers, called nodes, in a layer such as your application servers. You control it with triggers. Every minute, the platform looks at the average resource use over the number of minutes you set in the trigger, then decides whether to add or remove nodes. This is described in the automatic horizontal scaling documentation.

Triggers work like this:

  • The average covers the whole layer. Three nodes at 20%, 50% and 20% count as 30%.
  • A trigger can watch CPU, memory, network or disk activity. CPU and memory percentages are measured against the cloudlets allocated.
  • Adding nodes and removing nodes are two separate rules, each with its own timer.
  • Each rule has four settings: a load percentage, a time window in minutes, a node cap, and how many nodes to add or remove at a time. The node cap is the most nodes the layer may grow to when adding, and the fewest it may shrink to when removing.
  • A load balancer shares visitors across the nodes. If you scale a single standard application server (not a custom Docker container) in an environment without one, the platform adds an NGINX load balancer automatically. Remove the load balancer and the layer goes back to one node.
  • New nodes go on different hardware hosts, so a layer with several nodes is less exposed to a single host failing.

A new trigger in the Enscale Customer Dashboard starts with these defaults. To add a node: average load above 80% for 5 minutes, up to 2 nodes, one at a time. To remove one: average load below 10% for 10 minutes, down to 1 node. The platform documentation's own example is 65% to add and 20% to remove. Treat all of these as starting points and tune them against your own usage graph, which the trigger form shows for up to a week.

Setting Thresholds That Make Sense

  • Keep the add threshold above 50%. The platform documentation recommends it, because lower thresholds scale up when they don't need to, which wastes resources and money.
  • Leave a wide gap between add and remove. The minimum allowed difference is 20 percentage points. A wider gap stops nodes being added and removed over and over.
  • Choose the window by what you want to ignore. The window can be up to an hour, in steps (1, 5, 10, 15 minutes and so on). A short window reacts quickly and also reacts to blips. A long window ignores blips and reacts late.
  • Look for the windows, not a cooldown. The trigger form has no separate cooldown field. The two windows control how quickly Enscale reacts in each direction, and the defaults (5 minutes to add, 10 to remove) make it scale out faster than it scales in.
  • Cap the node count. The maximum number of nodes in the trigger caps how far that layer can grow, and so what it can cost. The documentation also notes a provider limit per layer, usually 16 nodes.

Scaling Modes

Each layer has a scaling mode (horizontal scaling documentation), which decides how a new node is built.

  • Stateful is the default for load balancer, application server and VPS layers. The platform copies the first node to each new node in turn. New nodes keep your custom setup, but this takes longer, especially with a lot of data.
  • Stateless builds all new nodes at once from the base image. That is faster, but new nodes start without your deployments, custom SSL certificates, custom mounts and add-ons, unless you script them in.

Because copying takes time in stateful mode, the automatic horizontal scaling documentation advises a lower add threshold there, so you don't hit your resource limit before the new node is ready. Here "stateless" describes how nodes are built, not whether your application is stateless.


Frequently Asked Questions

Will autoscaling handle a holiday sales spike like Black Friday?

It can follow the build-up and the drop-off, but not the first few minutes if the load jumps suddenly. On Enscale a trigger reacts to an average over a window, so it lags a sudden jump, and a new node still has to be created. For a sale, set your ceiling and node cap in advance, add nodes before the start, and check that your application and database can take the extra load. Autoscaling then covers what comes above that.

What is the difference between vertical and horizontal autoscaling?

Vertical autoscaling changes how much RAM and CPU one server can use, up to a ceiling you set. Horizontal autoscaling changes how many servers share the work, and needs an application that can run as several copies behind a load balancer.

How fast does autoscaling react to a traffic spike?

Not instantly. Triggers check once a minute and average the load over the window you set, so a short spike can pass unnoticed, and a new node then needs time to be created, longer in stateful mode with a lot of data. The platform documentation gives no figure, so test it on your own site, and add capacity beforehand if you know a surge is coming.

Will autoscaling make my database faster?

No. More web servers send more queries to the same database, and a cluster adds resilience and, for the right workloads, capacity, but doesn't make a slow query fast. If the database is the slow part, tune its queries and settings before scaling the application layer.

Can autoscaling cause a surprise bill?

It can if the limits are loose. On Enscale, dynamic cloudlets are billed hourly for what is used, up to the ceiling you set, and horizontal scaling stops at the maximum node count in your trigger. Set both on purpose, and keep the trigger's email notifications on, which they are by default. As an example, 16 dynamic cloudlets in use for an hour cost about £0.087 ex VAT.

Does my WordPress site need changes before it can scale horizontally?

It may. Files and cached data that a WordPress site keeps on one server won't exist on the others, so each extra server needs a shared place for them. Test with two nodes on a staging copy before you rely on a trigger, and ask us if you want a second opinion.

Planning for Your Next Sale?

Start your 14-day free trial of Enscale PaaS hosting. You upgrade to a full paid account inside the Enscale dashboard when you add a payment method for cloudlets.

If you would rather talk it through first, tell us when your next sale is and what your traffic looks like. We'll tell you whether autoscaling is the right fix, or whether the database or the application needs attention first. Our cloud architects offer a free consultation with no sales pressure. Contact us.