lab_code: demo_009
title_en: Database Seamless Scalability
title_zh: 数据库的无缝扩展
title_ja: データベースのシームレスな拡張
title_ko: 데이터베이스의 원활한 확장
description_en: TiDB uses a distributed architecture design that separates computing (SQL layer) from storage (TiKV layer), making it easy to scale horizontally. You can add more nodes to a TiDB cluster or remove existing nodes to change its capacity and performance without causing significant downtime or interruption to your application. This lab show you how to scale in/out the SQL layer and the storage layer. In addition, this lab also discusses the best practice to achieve application zero downtime when scaling in the SQL layer.
description_zh: TiDB采用分布式架构，将计算（SQL层）和存储（TiKV层）分离，便于水平扩展。无需对应用程序造成大规模停机或中断，即可在TiDB集群中添加或删除节点，以调整容量和性能。本实验将向您展示如何对SQL层和存储层进行扩容和缩容。此外，本实验还将讨论在SQL层缩容时实现应用程序零停机的最佳实践。
description_ja: TiDBは、計算（SQLレイヤー）とストレージ（TiKVレイヤー）を分離した分散アーキテクチャ設計を採用しており、水平スケーリングが容易です。アプリケーションに大きなダウンタイムや中断を引き起こすことなく、TiDBクラスタにノードを追加したり、既存のノードを削除して、容量やパフォーマンスを変更できます。本演習では、SQLレイヤーおよびストレージレイヤーのスケールイン／スケールアウト方法を学びます。さらに、SQLレイヤーのスケールイン時にアプリケーションのゼロダウンタイムを実現するためのベストプラクティスについても解説します。
description_ko: TiDB는 컴퓨팅(SQL 레이어)과 스토리지(TiKV 레이어)를 분리한 분산 아키텍처 설계를 사용하여 수평 확장이 용이합니다. 애플리케이션에 큰 다운타임이나 중단 없이 TiDB 클러스터에 노드를 추가하거나 기존 노드를 제거하여 용량과 성능을 조정할 수 있습니다. 이 실습에서는 SQL 레이어와 스토리지 레이어를 확장(스케일 아웃) 및 축소(스케일 인)하는 방법을 다룹니다. 또한, SQL 레이어 축소 시 애플리케이션 무중단을 달성하기 위한 모범 사례도 함께 설명합니다.
splash_image_en: https://lab-static.pingcap.com/quick-demo/demo_009_en.png
splash_image_zh: https://lab-static.pingcap.com/quick-demo/demo_009_en.png
splash_image_ja: https://lab-static.pingcap.com/quick-demo/demo_009_en.png
splash_image_ko: https://lab-static.pingcap.com/quick-demo/demo_009_en.png
lab_level: Intermediate
category_en:
  - Foundational Capability
  - Scalability
category_zh:
  - 基础能力
  - 可扩展性
category_ja:
  - 基礎能力
  - スケーラビリティ
category_ko:
  - 기초 능력
  - 확장성
authors:
  - Todd Bao (CEG)
delivery_type: Self-Paced
tidb_environments:
  - TiDB Self-Managed
tidb_versions:
  - 8.5.1
target_audience:
  - Architect
  - DBA
  - DevOps
regions:
  aws:
    - oregon
    - tokyo
    - singapore
    - frankfurt
credits: 2
credit_redeemable: true
employee_only: false
estimated_duration_minutes: 90

topology:
  - role: monitor
    node_count: 1
    web_ssh: true
    web_ssh_name: "TiUP Control Machine"
    ssh_user: ec2-user
  - role: pd
    node_count: 1
  - role: kv
    node_count: 4
  - role: db
    node_count: 2

requirements:
  - type: "CloudStack"

bootstrap:
  - name: "prepare monitor"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-monitor.sh

  - name: "prepare tidb cluster"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-tidb.sh

features:
  enable_content_explain: false
