Raff Apps

Scale app service

Changed on

Update the replica count, autoscaling bounds, or scale-to-zero. Live services apply the change with no downtime.

post/api/v1/apps/services/{service_id}/scale

Request

  • Base URL
    https://api.rafftechnologies.com
  • URL
    https://api.rafftechnologies.com/api/v1/apps/services/{service_id}/scale
  • Auth
    API key in header X-API-Key

Path parameters

service_idstring required

App service ID (UUID) or short id (the service_id field)

Request body

replicasinteger

Fixed number of instances.

autoscaling_setboolean

Send true to change the autoscaling fields: autoscaling_enabled, min_replicas, max_replicas, autoscaling_metric, autoscaling_target and scale_to_zero. With it, autoscaling_enabled and scale_to_zero are set exactly as sent, so leaving one out turns it off. Without it, only replicas changes.

autoscaling_enabledboolean

Only read when autoscaling_set is true.

min_replicasinteger

Fewest instances when autoscaling. Cannot be more than max_replicas.

max_replicasinteger

Most instances when autoscaling.

autoscaling_metric'concurrency'

What autoscaling follows: concurrency, the requests in progress per instance. Autoscaling is for web apps and for private apps with scale_to_zero; a worker or an always-on private app runs a fixed number of instances.

autoscaling_targetinteger

Requests in progress per instance before another instance starts.

scale_to_zeroboolean

Stop every instance when idle (the app sleeps about 15 minutes after its last request and wakes on the next one). Only for web and private apps, and only read when autoscaling_set is true.

Response

Updated service

successboolean

Changes

    • breaking

      removed the enum value cpu of the request property

    • breaking

      the / response's property format changed from uuid to no format for status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • breaking

      request property was restricted to a list of enum values

    • info

      added the new concurrency enum value to the request property

    • info

      added the new cpu enum value to the request property