> 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.md).

# App Service のサイズ設定

## 基本

SCEPman は主に CPU リソースに依存します。メモリとディスクの重要度はそれよりずっと低いです。

1 つの Azure P0V3 App Service Plan (195 ACUs) にある 1 つの SCEPman インスタンス（バージョン 3.0 以降）は、通常の条件下で 1 分あたり約 4000 件の要求を処理できます。要求には

* SCEP 発行要求と
* OCSP 要求です。

つまり、SCEPman は ACU あたり 1 分間に約 20 件の要求を処理できることになります。

証明書は 1 回だけ登録されますが、有効性は何度も確認されるため、合計では SCEP 要求よりも OCSP 要求のほうがはるかに多くなります。したがって、SCEPman インスタンスのサイズは OCSP 要求を基準に決めるべきです。

## 依存関係

お使いの SCEPman サービスの負荷にはいくつかの依存要因があり、環境によって異なります。重要な依存要因は次のとおりです:

1. 要求の分布
2. ネットワークリソースへのログイン頻度
3. 証明書要求/更新の頻度

特に要求の分布は非常に重要です。すべてのクライアントが同時に要求を行うと、SCEPman インスタンスに大きな負荷がかかります。あらゆるケースで、SCEPman が SCEP 要求に 1 分未満で応答できるよう努めるべきです。

{% hint style="warning" %}
SCEP プロファイルを多数のユーザー/デバイスに一度に割り当てないでください。SCEPman インスタンスで要求のピークが発生する可能性があります。
{% endhint %}

## 推奨

開始時点の目安として、Azure App Service Plans 向けに以下の Azure Compute Units (ACU) のサイズ設定を推奨します:

|   ユーザー/クライアント数   |                  単一構成                  |                     地理冗長構成                     |
| :--------------: | :------------------------------------: | :--------------------------------------------: |
|   < 5000 クライアント  |    <p>\~100 ACUs<br>（例: 1 x S1）</p>    |     <p>2 x \~100 ACUs</p><p>（例: 2 x S1）</p>    |
|  < 10.000 クライアント |  <p>\~200 ACUs</p><p>（例: 1 x P0V3）</p> |    <p>2 x \~200 ACUs</p><p>（例: 2 x P0V3）</p>   |
|  < 25.000 クライアント |  <p>\~400 ACUs</p><p>（例: 2 x P0V3）</p> |     <p>2 x \~400 ACUs<br>（例: 4 x P0V3）</p>     |
|  < 50.000 クライアント |  <p>\~800 ACUs</p><p>（例: 4 x P0V3）</p> |     <p>2 x \~800 ACUs<br>（例: 8 x P0V3）</p>     |
| < 100.000 クライアント | <p>\~1600 ACUs</p><p>（例: 4 x P1V3）</p> |   <p>2 x \~1600 ACUs</p><p>（例: 8 x P1V3）</p>   |
| > 100.000 クライアント | <p>\~3200 ACUs</p><p>（例: 4 x P2V3）</p> | <p>2 x \~3200 ACUs</p><p>（例: 2 x 4 x P2V3）</p> |

これらの推奨に基づいて、トラフィックを監視し、以下のセクションで説明されているようにスケールダウンできるかどうかを確認できます [微調整](#fine-tuning) 以下。

## Azure コスト予測

主な Azure コストは Azure App Service Plan(s) に対するものになります。コストは、上の表の要件と [Azure の価格表](https://azure.microsoft.com/en-us/pricing/calculator/) または、一般的な割引なしの [App Service Pricing](https://azure.microsoft.com/en-us/pricing/details/app-service/windows/) の概要

追加の Azure リソース（Key Vault、Storage Account、Log Analytics、プライベート エンドポイント用のネットワークリソース）は、コストへの影響は小さいです。環境内のユースケースによっては、これらの追加 Azure リソースの分として、App Service Plan コストに加えて 5% から 25% の追加を見込んでください。

{% hint style="info" %}
このコスト予測は、Azure のコストを見積もるためのあくまで目安です。環境によって大きく異なる場合があります。
{% endhint %}

## 微調整

各環境には、1 日の中で独自の負荷分布があります。多くの環境では、朝（始業時）に SCEPman の負荷がピークになります。

### 手動スケール

Azure App Service のスケールアウト機能を使うと、App Service の計算リソースを日々の負荷分布に合わせて調整できます。たとえば、朝のピークをカバーするために 08:00-10:00 の間は 2 x S1 にし、それ以外の時間は 1 x S1 に減らすことができます。

### 自動スケール

代わりに、必要なリソースに合わせるために Azure App Autoscaling 機能を使用できます。詳細は [自動スケーリング](/ja/azure-gou-cheng/azure-sizing/autoscaling.md).

### 手動スケールと自動スケール

負荷を十分に予測できる場合（たとえば負荷履歴から算出できる場合）は、自動スケールよりも手動スケールを推奨します。自動スケールは、スケール間の揺れを防ぐために、遅れて反応する（ヒステリシス）必要があるためです。


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
