서비스 자동 스케일링 설정 업데이트
서비스의 최소 및 최대 총 메모리 제한과 idle 모드 스케일링 동작을 업데이트합니다. 메모리 설정은 “production” 서비스에서만 사용할 수 있으며, 24GB부터 시작해 12의 배수여야 합니다. numReplicas 조정을 활성화하려면 지원팀에 문의하십시오.
curl --request PATCH \
--url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"idleScaling": true,
"idleTimeoutMinutes": 123,
"maxTotalMemoryGb": 360,
"minTotalMemoryGb": 48,
"numReplicas": 3
}
'import requests
url = "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling"
payload = {
"idleScaling": True,
"idleTimeoutMinutes": 123,
"maxTotalMemoryGb": 360,
"minTotalMemoryGb": 48,
"numReplicas": 3
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idleScaling: true,
idleTimeoutMinutes: 123,
maxTotalMemoryGb: 360,
minTotalMemoryGb: 48,
numReplicas: 3
})
};
fetch('https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'idleScaling' => true,
'idleTimeoutMinutes' => 123,
'maxTotalMemoryGb' => 360,
'minTotalMemoryGb' => 48,
'numReplicas' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling"
payload := strings.NewReader("{\n \"idleScaling\": true,\n \"idleTimeoutMinutes\": 123,\n \"maxTotalMemoryGb\": 360,\n \"minTotalMemoryGb\": 48,\n \"numReplicas\": 3\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"idleScaling\": true,\n \"idleTimeoutMinutes\": 123,\n \"maxTotalMemoryGb\": 360,\n \"minTotalMemoryGb\": 48,\n \"numReplicas\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idleScaling\": true,\n \"idleTimeoutMinutes\": 123,\n \"maxTotalMemoryGb\": 360,\n \"minTotalMemoryGb\": 48,\n \"numReplicas\": 3\n}"
response = http.request(request)
puts response.read_body{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {
"availablePrivateEndpointIds": [
"<string>"
],
"byocId": "<string>",
"clickhouseVersion": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"dataWarehouseId": "<string>",
"encryptionAssumedRoleIdentifier": "<string>",
"encryptionKey": "<string>",
"encryptionRoleId": "<string>",
"endpoints": [
{
"host": "<string>",
"port": 123,
"protocol": "mysql",
"username": "<string>"
}
],
"hasTransparentDataEncryption": true,
"iamRole": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idleScaling": true,
"idleTimeoutMinutes": 123,
"ipAccessList": [
{
"description": "<string>",
"source": "<string>"
}
],
"isPrimary": true,
"isReadonly": true,
"maxReplicaMemoryGb": 120,
"maxTotalMemoryGb": 360,
"minReplicaMemoryGb": 16,
"minTotalMemoryGb": 48,
"name": "<string>",
"numReplicas": 3,
"privateEndpointIds": [
"<string>"
],
"transparentDataEncryptionKeyId": "<string>"
},
"status": 200
}{
"error": "<string>",
"status": 400
}인증
ClickHouse Cloud 콘솔에서 발급받은 키 ID와 키 시크릿을 사용하십시오: https://clickhouse.com/docs/cloud/manage/openapi
경로 매개변수
서비스를 소유한 조직의 ID입니다.
스케일링 매개변수를 업데이트할 서비스의 ID입니다.
본문
true로 설정하면 유휴 상태일 때 서비스가 0까지 스케일 다운될 수 있습니다. 기본값은 true입니다.
최소 유휴 상태 전환 timeout(분)을 설정합니다. 5분 이상이어야 합니다.
지원 중단됨 - 기본값이 아닌 수의 레플리카를 사용하는 서비스에는 정확하지 않습니다. 자동 스케일링 중 3개 worker의 최대 메모리(GB)입니다. 'production' 서비스에서만 사용할 수 있습니다. 12의 배수여야 하며, 무료 서비스는 360 이하여야 하고 유료 서비스는 1068 이하여야 합니다.
24 <= x <= 1068다음의 배수여야 합니다 12360
지원 중단됨 - 기본값이 아닌 수의 레플리카를 사용하는 서비스에는 정확하지 않습니다. 자동 스케일링 중 3개 worker의 최소 메모리(GB)입니다. 'production' 서비스에서만 사용할 수 있습니다. 12의 배수이면서 24 이상이어야 합니다.
24 <= x <= 1068다음의 배수여야 합니다 1248
서비스의 레플리카 수입니다. warehouse의 첫 번째 서비스는 레플리카 수가 2개에서 20개 사이여야 합니다. 기존 warehouse에서 생성되는 서비스는 레플리카 수를 최소 1개까지 설정할 수 있습니다. 조직의 티어에 따라 추가 제한이 적용될 수 있습니다. 기본값은 BASIC 티어에서 1, SCALE 및 ENTERPRISE 티어에서 3입니다.
1 <= x <= 203
curl --request PATCH \
--url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"idleScaling": true,
"idleTimeoutMinutes": 123,
"maxTotalMemoryGb": 360,
"minTotalMemoryGb": 48,
"numReplicas": 3
}
'import requests
url = "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling"
payload = {
"idleScaling": True,
"idleTimeoutMinutes": 123,
"maxTotalMemoryGb": 360,
"minTotalMemoryGb": 48,
"numReplicas": 3
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idleScaling: true,
idleTimeoutMinutes: 123,
maxTotalMemoryGb: 360,
minTotalMemoryGb: 48,
numReplicas: 3
})
};
fetch('https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'idleScaling' => true,
'idleTimeoutMinutes' => 123,
'maxTotalMemoryGb' => 360,
'minTotalMemoryGb' => 48,
'numReplicas' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling"
payload := strings.NewReader("{\n \"idleScaling\": true,\n \"idleTimeoutMinutes\": 123,\n \"maxTotalMemoryGb\": 360,\n \"minTotalMemoryGb\": 48,\n \"numReplicas\": 3\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"idleScaling\": true,\n \"idleTimeoutMinutes\": 123,\n \"maxTotalMemoryGb\": 360,\n \"minTotalMemoryGb\": 48,\n \"numReplicas\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/scaling")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idleScaling\": true,\n \"idleTimeoutMinutes\": 123,\n \"maxTotalMemoryGb\": 360,\n \"minTotalMemoryGb\": 48,\n \"numReplicas\": 3\n}"
response = http.request(request)
puts response.read_body{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {
"availablePrivateEndpointIds": [
"<string>"
],
"byocId": "<string>",
"clickhouseVersion": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"dataWarehouseId": "<string>",
"encryptionAssumedRoleIdentifier": "<string>",
"encryptionKey": "<string>",
"encryptionRoleId": "<string>",
"endpoints": [
{
"host": "<string>",
"port": 123,
"protocol": "mysql",
"username": "<string>"
}
],
"hasTransparentDataEncryption": true,
"iamRole": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idleScaling": true,
"idleTimeoutMinutes": 123,
"ipAccessList": [
{
"description": "<string>",
"source": "<string>"
}
],
"isPrimary": true,
"isReadonly": true,
"maxReplicaMemoryGb": 120,
"maxTotalMemoryGb": 360,
"minReplicaMemoryGb": 16,
"minTotalMemoryGb": 48,
"name": "<string>",
"numReplicas": 3,
"privateEndpointIds": [
"<string>"
],
"transparentDataEncryptionKeyId": "<string>"
},
"status": 200
}{
"error": "<string>",
"status": 400
}