← Back to the Pokédex #002 · Compute

Scalix

Scalix evolving into Megascalix
Type
Compute
Anomaly
Runaway autoscale
Evolves into
Megascalix
Weakness
Autoscale max limits, instance count alerts

What it is

Scalix appears when autoscale scales out aggressively and never scales back in. A traffic spike, a bad metric, a retry storm or an attack can push instance counts to the maximum and keep them there.

How to spot it

  • Compute cost climbing day over day for VMSS, App Service Plans or AKS node pools.
  • Instance count far above the normal baseline.
  • Scale-out events in the Activity Log with no matching scale-in.

Common causes

  • Scale-in thresholds that are never reached, or flapping rules.
  • Maximum instance count set far too high or effectively unbounded.
  • Scaling on a metric driven by errors or retries.
  • Overly long cooldown periods.

Evolution: Megascalix

A very high max limit combined with premium SKUs or GPUs turns a runaway scale-out into a very large bill in hours.

Defences

  • Set sensible autoscale max limits.
  • Alert on instance count and scale-out events.
  • Test scale-in rules, not just scale-out.
  • Use budgets and anomaly alerts as a backstop.

Real world encounter

The encounter

A customer processes incoming messages with Azure Functions on an Elastic Premium plan. Normally this runs on one or two nodes. One day a storm of messages arrives and the plan scales out to 30 nodes to keep up. Elastic scale did exactly what it was designed to do, and that was the problem.

Tracking it down

Billing data lags, so the invoice didn't show it for a while. The first real signal was in metrics: instance count on the plan sat at its maximum for hours, far above baseline, and dead letter counts were climbing. The scaled-out functions were all trying to write to a database sized for normal load. It couldn't cope, so writes failed, messages were retried over and over, and eventually dead lettered. The failing messages kept the plan scaled out because there was always more work to do.

Catching it

Someone noticed the dead letter queue and the instance count, and the team reduced the maximum scale-out limit to what the database could sustainably handle. They put queue-based load levelling in front of the database so messages are processed at a steady rate instead of as fast as possible, and added alerts on instance count.

The lesson

Scalix is mostly a PaaS and serverless risk, because things grow and shrink elastically on your behalf. Scale-out needs to be designed around downstream bottlenecks and maximum sustainable throughput, not just the front door. Billing alerts won't help in time because of data lag, so metric monitoring is essential. If you need at least one node anyway, spreading load over time may be cheaper than bursting to process it quickly. It's a trade off.