Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mikronita/mikrom/llms.txt

Use this file to discover all available pages before exploring further.

Mikrom gives you two scaling modes for every application: a fixed replica count that you control manually, and an autoscaling policy that adjusts replicas automatically based on CPU and memory utilisation thresholds. Both modes sit on top of a platform-level scale-to-zero behaviour — when no traffic reaches your application for a period, Mikrom terminates the running microVMs and restores them on the next incoming request, keeping idle costs near zero.
Scale to zero is always active. Regardless of your scaling configuration, Mikrom will scale your application to zero replicas after a period of inactivity. The first request after a cold start incurs a short microVM boot latency (~125–200 ms depending on the hypervisor). If your workload cannot tolerate cold starts, set --min 1 in your autoscaling policy to keep at least one replica warm at all times.

Resource Presets Reminder

Scaling adjusts the number of replicas. Each replica is a separate microVM provisioned with the resource preset you specified at deploy time.
ResourceAvailable ValuesDefault
CPU cores1, 2, 3, 41
Memory512M, 1G, 2G, 4G512M
To change the resource allocation per replica, re-deploy the application with new --cpu and --memory values. See Deploying Applications for details.

Scaling Configurations

Fixed scaling sets an exact replica count and disables autoscaling entirely. Mikrom will maintain that number of running microVMs regardless of traffic load, subject to the platform’s scale-to-zero override on inactivity.
mikrom app scale --name my-app --replicas 2
FlagRangeDescription
--replicas03Desired fixed replica count; disables autoscaling
Setting --replicas 0 stops all instances immediately and keeps the app quiesced until you rescale or until an incoming request triggers a cold start.
Passing --replicas always disables autoscaling for that application, even if an autoscaling policy was previously configured. To re-enable autoscaling, use --auto true as shown in the Autoscaling tab.

Scaling Examples

Keep one warm replica, scale up under load

This configuration ensures the application always has at least one running instance (avoiding cold starts) but can burst to three replicas when CPU exceeds 60%.
mikrom app scale \
  --name my-app \
  --auto true \
  --min 1 \
  --max 3 \
  --cpu 60

Allow full scale-to-zero with memory-based autoscaling

Applications that can tolerate occasional cold starts can set --min 0 to eliminate idle costs entirely while still scaling out automatically under memory pressure.
mikrom app scale \
  --name my-app \
  --auto true \
  --min 0 \
  --max 2 \
  --mem 75

Temporarily pin replicas during a deployment window

During a critical deployment or maintenance window you may want to freeze the replica count and prevent autoscaling from interfering.
# Pin to 2 replicas (disables autoscaling)
mikrom app scale --name my-app --replicas 2

# Restore autoscaling after the window
mikrom app scale --name my-app --auto true --min 1 --max 3 --cpu 70 --mem 80

Stop all instances

mikrom app scale --name my-app --replicas 0
Use mikrom app list to check the current replica count and scaling mode for all your applications. Combine with mikrom app deployments --name <name> to correlate scaling events with specific deployment versions.

Build docs developers (and LLMs) love