Service

Update service auto scaling settings

Updates minimum and maximum total memory limits and idle mode scaling behavior for the service. The memory settings are available only for "production" services and must be a multiple of 12 starting from 24GB. Please contact support to enable adjustment of numReplicas.

patch/v1/organizations/{organizationId}/services/{serviceId}/scaling

Request

  • Base URL: https://api.clickhouse.cloud
  • URL: https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling
  • Auth: HTTP basic

Path parameters

organizationIdstring uuid required

ID of the organization that owns the service.

serviceIdstring uuid required

ID of the service to update scaling parameters.

Request body

minTotalMemoryGbnumber

DEPRECATED - inaccurate for services with non-default numbers of replicas. Use minReplicaMemoryGb instead. Minimum memory of three workers during auto-scaling in Gb. Available only for 'production' services. Must be a multiple of 12 and greater than or equal to 24. Always absent for horizontal-autoscaling services (replica count is variable).

maxTotalMemoryGbnumber

DEPRECATED - inaccurate for services with non-default numbers of replicas. Use maxReplicaMemoryGb instead. Maximum memory of three workers during auto-scaling in Gb. Available only for 'production' services. Must be a multiple of 12 and lower than or equal to 360 for non paid services or 1068 for paid services. Always absent for horizontal-autoscaling services (replica count is variable).

numReplicasinteger

Number of replicas for the service. The number of replicas must be between 2 and 50 for the first service in a warehouse. Services that are created in an existing warehouse can have a number of replicas as low as 1. Further restrictions may apply based on your organization's tier and its per-warehouse replica limit. It defaults to 1 for the BASIC tier and 3 for the SCALE and ENTERPRISE tiers.

idleScalingboolean

When set to true the service is allowed to scale down to zero when idle. True by default.

idleTimeoutMinutesnumber

Set minimum idling timeout (in minutes). Must be >= 5 minutes.

Example request

{
  "minTotalMemoryGb": 48,
  "maxTotalMemoryGb": 360,
  "numReplicas": 3
}

Response

Successful response

statusnumber

HTTP status code.

requestIdstring uuid

Unique id assigned to every request. UUIDv4

Example response

{
  "status": 200,
  "result": {
    "endpoints": [
      {
        "protocol": "mysql"
      }
    ],
    "minTotalMemoryGb": 48,
    "maxTotalMemoryGb": 360,
    "minReplicaMemoryGb": 16,
    "maxReplicaMemoryGb": 120,
    "numReplicas": 3,
    "minReplicas": 1,
    "maxReplicas": 5,
    "autoscalingMode": "vertical",
    "replicaMemoryGb": 32,
    "tags": [
      {
        "key": "Environment",
        "value": "staging"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.