이 페이지에서는 Spanner의 자동 확장 작동 방식을 설명하고 Spanner에서 사용할 수 있는 2가지 자동 확장 유형을 소개합니다.
Spanner 확장
Spanner 인스턴스를 만들 때 데이터 제공 시에 사용할 컴퓨팅 용량 노드 또는 처리 단위 수를 선택합니다. 하지만 워크로드가 증가하거나 감소하는 경우가 있습니다. 인스턴스 확장은 인스턴스 워크로드 또는 데이터 스토리지 니즈 변화에 따라 컴퓨팅 용량을 추가하거나 삭제하는 프로세스입니다.
인스턴스의 CPU 사용량과 같은 측정항목에 따라 Spanner 인스턴스를 확장하는 것이 유용할 수 있습니다. 예를 들어 인스턴스가 과부하 상태이고 해당 CPU 사용률이 높은 경우 컴퓨팅 용량을 일시적으로 추가하고 CPU 사용량이 줄어들면 다시 삭제할 수 있습니다. 사용량이 많지 않을 때 인스턴스에서 컴퓨팅 용량을 삭제하면 비용이 절감됩니다.
컴퓨팅 용량을 추가하여 모든 Spanner 성능 문제를 해결할 수는 없습니다. 예를 들어 인스턴스를 수직 확장해도 잠금 경합 및 핫스팟과 같은 인스턴스 크기와 관련없이 발생한 문제가 해결되지 않을 수 있습니다.
워크로드 변경사항을 충족하도록 Spanner 인스턴스를 확장할 수 있는 2가지 방법이 있습니다.
컴퓨팅 용량을 추가하거나 삭제하도록 인스턴스를 수동으로 구성합니다.
컴퓨팅 용량이 워크로드 수준에 맞게 자동으로 확장되거나 축소되도록 인스턴스에서 자동 확장을 구성합니다.
이 페이지의 요구사항은 관리형 자동 확장 기능 및 오픈소스 자동 확장 처리 도구 모두에 적용됩니다.
자동 확장을 사용해야 하는 경우
자동 확장의 이점은 다음과 같습니다.
비용: 자동 확장은 인스턴스의 컴퓨팅 용량을 줄입니다. 이렇게 하면 초과 프로비저닝을 방지하는 데 도움이 됩니다.
성능: 자동 확장을 사용하면 워크로드가 변경되거나 데이터 스토리지 요구사항이 증가할 때 Spanner에서 컴퓨팅 용량을 인스턴스에 자동으로 추가할 수 있습니다. 이렇게 하면 인스턴스에 대상 CPU 사용률 및 스토리지 요구사항을 충족하기에 충분한 컴퓨팅 용량이 있는지 확인하여 워크로드 성능 목표를 유지할 수 있습니다.
자동화: 자동 확장을 통해 관리 복잡성이 줄어듭니다. 인스턴스 크기를 수동으로 모니터링하고 확장할 필요가 없습니다. 관리형 자동 확장을 사용하면 Spanner 서비스에서 자동으로 이러한 태스크를 처리하므로 태스크가 수행되도록 애플리케이션을 작성하지 않습니다.
다음과 같은 상황에서 자동 확장을 선택하는 것이 좋습니다.
안정적인 일일 또는 순환 트래픽 패턴(예: 온라인 뱅킹 시스템에서 생성된 패턴)
유기적인 성장을 예상하는 새로운 애플리케이션
Spanner를 처음 사용하는 워크로드
Spanner는 트래픽이 증가하면 컴퓨팅 용량을 빠르게 추가하지만 추가 용량의 균형을 맞추는 데 시간이 걸릴 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-16(UTC)"],[],[],null,["# Autoscaling overview\n\nThis page explains how autoscaling works in Spanner, and introduces\nthe two types of autoscaling you can use in Spanner.\n\nScaling Spanner\n---------------\n\nWhen you create a [Spanner instance](/spanner/docs/instances),\nyou choose the number of [compute capacity nodes or processing\nunits](/spanner/docs/compute-capacity) to use when serving your data. However,\nthere are times when the workload might increase or decrease. *Scaling* an\ninstance is the process of adding or removing compute capacity in response to\nchanges in the instance's workload or data storage needs.\n\nIt can be useful to scale your Spanner instance based on metrics\nsuch as the instance's CPU usage. For example, if your instance is under a heavy\nload and its CPU utilization is high, you can temporarily add compute capacity\nand remove it again when its CPU usage drops. Removing compute capacity from the\ninstance when it doesn't have heavy usage lowers costs.\n\nYou can't resolve all Spanner performance issues by adding\ncompute capacity. For example, scaling up an instance can't solve problems that\noccur that are unrelated to the instance size, such as lock contention and\nhotspots.\n\nThere are two ways that you can scale your Spanner instance to\nmeet workload changes:\n\n- Configure your instance manually to add or remove compute capacity.\n- Configure autoscaling on your instance so that compute capacity automatically scales up or down to meet workload levels.\n\nFor autoscaling, you have the following options:\n\n- Configure [Spanner managed autoscaling](/spanner/docs/managed-autoscaler).\n- Set up the open source [Autoscaler tool for Spanner](/spanner/docs/autoscaler-tool-overview).\n\nRequirements on this page apply to both the managed autoscaling feature and the\nopen source Autoscaler tool.\n\nWhen to use autoscaling\n-----------------------\n\nThe benefits of autoscaling include the following:\n\n- **Costs:** Autoscaling reduces costs by decreasing compute capacity during off-peak hours, which helps avoid over-provisioning.\n- **Performance:** Autoscaling lets Spanner automatically add compute capacity to an instance when a workload changes or there is an increase in data storage requirements. This helps maintain workload performance objectives by ensuring that the instance has enough compute capacity to meet the target CPU utilization and storage requirements.\n- **Automation:** Autoscaling reduces management complexity. You don't need to monitor and scale the instance size manually. With managed autoscaling, you don't write an application to do these tasks, because the Spanner service handles them for you.\n\nAutoscaling is often the best choice for the following situations:\n\n- Steady diurnal or cyclical traffic patterns, such as those generated by online banking systems.\n- New applications expecting organic growth.\n- Workloads that are new to Spanner.\n\nAlthough Spanner quickly adds compute capacity when traffic\nincreases, it can take time to balance the additional capacity.\n\nWhat's next\n-----------\n\n- Learn more about [Managed autoscaler for Spanner](/spanner/docs/managed-autoscaler)\n - Learn how to [create an instance with the managed autoscaler enabled](/spanner/docs/create-manage-instances#create-instance)\n - Learn how to [modify an instance to add autoscaling or change autoscaling settings](/spanner/docs/create-manage-instances#modify-managed-autoscaler)\n - Learn how to [change an instance from using autoscaling to manual scaling](/spanner/docs/create-manage-instances#remove-managed-autoscaler)\n- Learn more about the [Autoscaler tool for Spanner](/spanner/docs/autoscaler-tool-overview)"]]