← Back to docs

Recipe: Instance warmup before serving traffic

Pre-warm your Meridian instances so the first real request never hits a cold start.

When a Meridian instance boots, it must load the license payload, verify the Ed25519 signature, resolve IAT entries, and prime the hardware-fingerprint cache. If the first request arrives before those steps finish, it will be rejected with a transient error. Warming the instance eliminates that race.

The warmup endpoint runs every boot-time check synchronously and returns 200 OK only when the instance is ready. Orchestrators should poll this endpoint before adding the instance to the load-balancer pool.

For Kubernetes, combine the warmup call with a startup probe. For Nomad or ECS, invoke it from a pre-start hook. The endpoint is idempotent — calling it multiple times has no side effects.

Example requests

# curl
curl -f -X POST https://instance.meridian.local/warmup \
  -H "Authorization: Bearer $MERIDIAN_API_KEY"

# python
import requests

resp = requests.post(
    "https://instance.meridian.local/warmup",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
resp.raise_for_status()
print("Instance warm")

Next steps