Zudoku
Unikraft Cloud Platform API

Autoscale

Endpoint

Services allow you to load balance traffic for an Internet-facing service like a webserver by creating multiple instances within the same service. While you can add or remove instances to a service to scale your service, doing this manually makes it hard to react to changes in service load. On the other hand, always keeping a large number of instances running to cope with bursts is not an option either. This is where autoscale comes into play. With autoscale enabled, Unikraft Cloud takes the heavy lifting of constantly monitoring the load of your service and automatically creates or deletes instances as needed.


List Autoscale Configurations

GET
https://api.fra.unikraft.cloud
/v1/services/autoscale

Return the current states and configurations of autoscale configurations for a given set of service groups given their UUIDs or names.

List Autoscale Configurations Request Body

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: uuid
type = object · requires: name
Properties for uuid:
  • uuidstring · uuid · required

    Mutually exclusive with name.

    Example: 123e4567-e89b-12d3-a456-426614174000

List Autoscale Configurations Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Create Autoscale Configurations

POST
https://api.fra.unikraft.cloud
/v1/services/autoscale

Create one or more autoscale configurations for the specified service groups given their UUIDs or names.

Create Autoscale Configurations Request Body

  • uuidstring · uuid

    The UUID of the service to create a configuration for. Mutually exclusive with name.

    Example: 123e4567-e89b-12d3-a456-426614174000
  • namestring

    The name of the service to create a configuration for. Mutually exclusive with UUID.

    Example: funky-service
  • min_sizeinteger · int64

    The minimum number of instances to keep running.

    Example: 2
  • max_sizeinteger · int64

    The maximum number of instances to keep running.

    Example: 12
  • warmup_time_msinteger · int64

    The warmup time in milliseconds for new instances.

    Example: 100
  • cooldown_time_msinteger · int64

    The cooldown time in milliseconds for the autoscale configuration.

    Example: 100
  • create_argsobject

    The arguments to use when creating the autoscale configuration.

  • policiesobject[]

    The policies to apply to the autoscale configuration.

Create Autoscale Configurations Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Delete Autoscale Configurations

DELETE
https://api.fra.unikraft.cloud
/v1/services/autoscale

Delete autoscale configuration for a given set of service groups given their UUIDs or names.

Delete Autoscale Configurations Request Body

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: uuid
type = object · requires: name
Properties for uuid:
  • uuidstring · uuid · required

    Mutually exclusive with name.

    Example: 123e4567-e89b-12d3-a456-426614174000

Delete Autoscale Configurations Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Get Autoscale Configurations by Service Group UUID

GET
https://api.fra.unikraft.cloud
/v1/services/{uuid}/autoscale

Return the current states and configurations of autoscale configurations given a service group UUID.

Get Autoscale Configurations by Service Group UUIDpath Parameters

  • uuidstring · uuid · required

    The UUID of the service group.

Get Autoscale Configurations by Service Group UUID Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Create Autoscale Configuration by Service Group UUID

POST
https://api.fra.unikraft.cloud
/v1/services/{uuid}/autoscale

Create an autoscale configuration for the specified service group given its UUID.

Create Autoscale Configuration by Service Group UUIDpath Parameters

  • uuidstring · uuid · required

    The UUID of the service to create a configuration for. Mutually exclusive with name.

Create Autoscale Configuration by Service Group UUID Request Body

  • uuidstring · uuid

    The UUID of the service to create a configuration for. Mutually exclusive with name.

  • min_sizeinteger · int64

    The minimum number of instances to keep running.

  • max_sizeinteger · int64

    The maximum number of instances to keep running.

  • warmup_time_msinteger · int64

    The warmup time in milliseconds for new instances.

  • cooldown_time_msinteger · int64

    The cooldown time in milliseconds for the autoscale configuration.

  • create_argsobject

    The arguments to use when creating the autoscale configuration.

  • policiesobject[]

    The policies to apply to the autoscale configuration.

Create Autoscale Configuration by Service Group UUID Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Delete Autoscale Configurations by Service Group UUID

DELETE
https://api.fra.unikraft.cloud
/v1/services/{uuid}/autoscale

Delete the autoscale configuration for the service group given its UUID.

Unikraft Cloud will immediately drain all connections from all instances that have been created by autoscale and delete the instances afterwards. The draining phase is allowed to take at most cooldown_time_ms milliseconds after which remaining connections are forcefully closed. The master instance is never deleted. However, deleting the autoscale configuration causes the master instance to start if it is stopped.

Delete Autoscale Configurations by Service Group UUIDpath Parameters

  • uuidstring · uuid · required

    The UUID of the service group.

Delete Autoscale Configurations by Service Group UUID Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

List Autoscale Configuration Policies

GET
https://api.fra.unikraft.cloud
/v1/services/{uuid}/autoscale/policies

List the autoscale policies for a given service group given its UUID.

List Autoscale Configuration Policiespath Parameters

  • uuidstring · required

List Autoscale Configuration Policies Request Body

  • namestring · required

    The Name of the policy to get.

    Example: funky-policy

List Autoscale Configuration Policies Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Create Autoscale Configuration Policy

POST
https://api.fra.unikraft.cloud
/v1/services/{uuid}/autoscale/policies

Add a new autoscale policy to an autoscale configuration given a service group UUID.

Create Autoscale Configuration Policypath Parameters

  • uuidstring · required

Create Autoscale Configuration Policy Request Body

  • namestring · required

    The Name of the service to add a policy to.

    Example: funky-service
  • typeobject · required

    The policy type to add to the autoscale configuration.

Create Autoscale Configuration Policy Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Delete Autoscale Configuration Policies

DELETE
https://api.fra.unikraft.cloud
/v1/services/{uuid}/autoscale/policies

Delete one or more autoscale policies for a given service group.

Delete Autoscale Configuration Policiespath Parameters

  • uuidstring · required

Delete Autoscale Configuration Policies Request Body

  • namestring · required

    The Name of the policy to delete.

    Example: funky-policy

Delete Autoscale Configuration Policies Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Get Autoscale Configuration Policy by Name

GET
https://api.fra.unikraft.cloud
/v1/services/{uuid}/autoscale/policies/{name}

Return the current state and configuration of an autoscale policy given the service group UUID and the name of the policy.

Get Autoscale Configuration Policy by Namepath Parameters

  • uuidstring · uuid · required

    The UUID of the service group.

  • namestring · required

    The name of the policy to get.

Get Autoscale Configuration Policy by Name Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations

Delete Autoscale Configuration Policy by Name

DELETE
https://api.fra.unikraft.cloud
/v1/services/{uuid}/autoscale/policies/{name}

Delete an autoscale policy by name given the service group UUID.

Delete Autoscale Configuration Policy by Namepath Parameters

  • uuidstring · uuid · required

    The UUID of the service group.

  • namestring · required

    The name of the policy to delete.

Delete Autoscale Configuration Policy by Name Responses

default

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object
Properties for message:
  • messagestring

    An optional message providing additional information about the status. This field is useful when the status is not success.

    Example: Failed to perform all operations