> For the complete documentation index, see [llms.txt](https://docs.scepman.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scepman.com/ja/azure-gou-cheng/azure-sizing/autoscaling.md).

# 自動スケーリング

自動スケーリングは、需要に応じて稼働インスタンス数を自動調整し、パフォーマンスを維持しつつコストを管理します。

## 手順

{% stepper %}
{% step %}

### App Service プランの自動スケール設定に移動します

Azure Portal > App Service プラン > *あなたの SCEPman App Service プラン* > 設定 > スケールアウト

<figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FJxsXNbiOIkZpTqFHt18U%2Fimage.png?alt=media&amp;token=6a02f149-60fd-4d00-a0c6-3dd4129a9e8d" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
App Service プランが少なくとも次を使用していることを確認してください: **S1 または P0V3** 価格レベル。下位のプランでは複数インスタンスを提供できない場合があります。
{% endhint %}
{% endstep %}

{% step %}

### ルールベースの自動スケーリングを選択します

もう一度 **ルールベース**、その後 **構成** 進めるには。

<figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2F9rNIdUu3i5QNB5GR3RlB%2Fimage.png?alt=media&amp;token=1eecf795-dbb5-4321-ba5b-0d23e181fb9e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### 自動スケール設定を構成する

サービスの現在の負荷に基づいてインスタンス数をスケールするには、2 つのスケーリング ルール条件を追加する必要があります。高負荷時にインスタンス数を増やすルールと、負荷が再び減少した後にインスタンス数を減らすルールです。

<figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FrAJsrjbM9PHu1Teqi8r6%2Fimage.png?alt=media&amp;token=58d2ebf4-8109-4eff-baab-ab4eac80c922" alt=""><figcaption></figcaption></figure>

1. もう一度 **カスタム自動スケール**
2. 適切な名前を次に入力してください: **自動スケール設定名**
3. もう一度 **メトリックに基づいてスケールする** 定義済みのルール セットに基づく自動スケーリングを有効にするには
4. ビジネス要件に合わせてインスタンスの上限と下限を設定します:
   * 最小
   * 最大
   * 既定
5. もう一度 **ルールを追加** 自動スケーリング ルールを構成する準備ができたら
   {% endstep %}

{% step %}

### 自動スケーリング ルールを構成する

{% hint style="info" %}
増加ルールと減少ルールの設定は以下を推奨します。\nただし、これはワークロードによって異なり、監視と最適化が必要である点にご注意ください!
{% endhint %}

#### インスタンス数増加ルール

1. **メトリックをインスタンス数で割るを有効にする**
2. 選択 **より大きい** を演算子として選択し、しきい値を次に設定します: **70** （パーセント）
3. 継続時間を次に設定します: **10** （分）
4. 次を確認してください: **時間粒度の統計** が **平均**
5. 次を確認してください: **操作** が **次の数だけ増やす**
6. 次を設定します **クールダウン（分）** を **15** （分）
7. 次を確認してください: **インスタンス数 (1)** 現在のインスタンスに追加されます
8. クリック **追加** 完了したら

<figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2F6ubxm4jj1jySwLCOVglz%2Fimage.png?alt=media&amp;token=f3b49f46-4ecf-4970-9c4f-0f37709c57b1" alt=""><figcaption></figcaption></figure>

#### インスタンス数減少ルール

1. もう一度 **ルールを追加** 追加のルールを追加するには
2. **メトリックをインスタンス数で割るを有効にする**
3. 選択 **より小さい** を演算子として選択し、しきい値を次に設定します: **35** （パーセント）
4. 継続時間を次に設定します: **20** （分）
5. 次を確認してください: **時間粒度の統計** が **平均**
6. 次を確認してください: **操作** が **次の数だけ減らす**
7. 次を設定します **クールダウン（分）** を **30** （分）
8. 次を確認してください: **インスタンス数 (1)** 現在のインスタンスから削除されます
9. クリック **追加** 完了したら

<figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FFR2zvv6GfB3I1bC999qo%2Fimage.png?alt=media&amp;token=f9a0d789-b60d-4595-a26c-8aeeb9391221" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### 自動スケール設定を保存

おめでとうございます! App Service プランは、これでルールに従ってスケールアップおよびスケールダウンします。

<figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FzO8pPVQvkJwUTrsxKZfr%2Fimage.png?alt=media&amp;token=0334ffe6-42ee-4746-b12f-26724e204f95" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.scepman.com/ja/azure-gou-cheng/azure-sizing/autoscaling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
