Skip to content
0850 554 5439 [email protected]

How can we help?

Search our guides and tutorials, or browse the categories below.

Gyro Containers: autoscaling and alerts

Gyro Containers (ECS) 87 views Step-by-step guide Last verified: Markdown
What you will learnhow to let a service's replica count follow the load and how to get notified when a service goes down, keeps restarting or runs out of capacity.
Time8 minutes

1. Turning autoscaling on

  1. In Services, click your service and press Autoscaling.
  2. Switch on Adjust the replica count to the load automatically.
  3. Enter Min replicas, Max replicas and CPU target (%). Optionally a Memory target (%) (0 = off).
  4. Press Save.

How it works:

  • Percentages refer to the size you reserved. If a replica has 0.5 vCPU, a 70 % target means 0.35 vCPU on average per replica.
  • Replicas are added when the average use exceeds the target (at most double every 30 seconds). When the load drops, one replica is removed per minute after 3 calm minutes.
  • Max cannot exceed your plan's replica limit per service.
  • While autoscaling is on, Scale cannot change the replica count by hand; change min / max or switch autoscaling off (the current count is kept).
  • Scaling settings do not create a revision; a rollback does not change them.
bash
gyro container service autoscale 12345 web --autoscaling '{"enabled":true,"min":2,"max":6,"cpu_percent":70}'
gyro container service autoscale 12345 web --autoscaling '{"enabled":false}'   # off
Note

Replicas start as long as they fit in your node pool. When the pool is full, extra replicas wait; the service page shows "Some replicas wait because the node pool is full", and saving the settings tells you how many replicas currently fit. Upgrade the plan or reduce the replica size.

2. What do I see?

The Autoscaling section of the service shows the replica range, the current (and desired) replica count, the average CPU / memory use and the target. A yellow warning appears when the service is at its maximum and the load is still high. Usage of new replicas appears after 1-2 minutes. The service list shows a min–max badge next to autoscaled services.

3. Setting up alerts (Notifications)

  1. Open the Notifications tool of your service.
  2. Pick channels:
    • E-mail (your account e-mail; on by default)
    • SMS (your account phone)
    • Telegram: send /start to @gyrouptime_bot; the bot replies with your chat id, enter it.
    • Webhook: a public https address. Requests are JSON POSTs signed with X-Gyro-Signature: sha256=HMAC(secret, X-Gyro-Timestamp + "." + body). Get the secret with Show signing secret.
  3. Pick Events:
    • Service down: no ready replica (the first 3 minutes of a new service do not count).
    • Service keeps restarting / image cannot be pulled: crash loop, image pull error, out of memory.
    • Ready replicas below the threshold: per-service threshold, the Alert threshold field in the Autoscaling window (0 = off).
    • Autoscaling at its maximum: the service runs at max replicas and the load is still above target.
    • Node capacity is not enough: the requested replicas do not fit in the pool.
  4. Set the Repeat interval (default 30 minutes) and press Save. Send a test notification checks your channels (at most 5 per 10 minutes).

Rules:

  • An event is announced when it lasts about 2 minutes (no alerts for short spikes).
  • The same service and event is not announced again within the repeat interval; flapping is suppressed too.
  • A "Resolved" message follows once when it is back to normal (can be turned off). SMS is sent only when a problem starts.
  • Suspended or cancelled services send no alerts.

Example webhook body:

json
{"event":"container.alert.trigger","service_id":12345,"service":"web","type":"down","status":"firing",
 "title":"Service web is down","message":"No ready replica (0/2). ...","detail":{"ready":0,"wanted":2},"at":"2026-11-12T21:00:00+00:00"}

4. API, CLI and Terraform

bash
gyro container notifications get 12345
gyro container notifications set 12345 --email --telegram 123456789 --webhook-url https://ops.example.com/gyro --events down,crashloop,capacity --cooldown 15
gyro container notifications test 12345
gyro container notifications webhook-secret 12345

API: PUT /cloud/containers/{id}/services/{name}/autoscaling, GET/PUT /cloud/containers/{id}/notifications, POST .../notifications/test, POST .../notifications/webhook-secret. Terraform: autoscaling and notification on gyro_container_service, and the gyro_container_notifications resource for channels (API, CLI and Terraform).

5. Frequently asked questions

Does autoscaling cost extra?

No. Replicas run on your own node pool; you pay the environment and node fees of your plan.

Why does it not reach the maximum?

If your node pool is full, extra replicas wait for room. Enable the "Node capacity is not enough" alert; upgrade the plan or use a smaller replica size.

Can I get alerts on WhatsApp?

No. E-mail, SMS, Telegram and webhooks are supported; forward webhooks to your own tools (Slack, Discord, ...).

When should I use a memory target?

When your app's memory grows with the load. Apps whose memory never goes down (caches) may keep the replica count high; for most web services a CPU target is enough.

Next step

Was this helpful?

Thanks for your feedback!

Still Need Help?

Our support team is here around the clock for anything you can't find above.