すべてのプロダクト
Search
ドキュメントセンター

Alibaba Cloud Service Mesh:ASMAdaptiveConcurrency CRD を使用してアダプティブ同時実行制御を実装する

最終更新日:Mar 29, 2025

ASMAdaptiveConcurrency カスタムリソース定義 (CRD) は、サンプリングされたリクエストデータに基づいて、サービスに許可される同時リクエストの最大数を動的に調整できます。 同時リクエスト数がサービスでサポートされる最大値を超えると、サービスを保護するために超過リクエストは拒否されます。 このトピックでは、ASMAdaptiveConcurrency CRD を使用してアダプティブ同時実行制御を実装する方法について説明します。

前提条件

背景情報

負荷容量を超えた場合、サービスは超過リクエストを拒否することが想定されています。 これにより、他の連鎖反応を防ぎます。 ASM インスタンスの宛先ルールを構成して、基本的なサーキットブレーカーを実装できます。 保留中のリクエストの特定の数など、サーキットブレーカーをトリガーするためのしきい値を指定する必要があります。 ASM インスタンスのデータプレーンへのアクセスリクエスト数がしきい値を超えると、超過リクエストは拒否されます。ただし、実際のシナリオでは、サービスの負荷容量を正確に見積もることは困難です。

ASMAdaptiveConcurrency CRD は、アダプティブ同時実行制御アルゴリズムを使用して、サンプルレイテンシと計算された最小レイテンシを定期的に比較し、一連の計算を実行することにより、サービスの同時実行制限を動的に調整します。 これにより、同時実行制限はサービスの負荷容量に近くなり、超過リクエストは拒否されます。 リクエストが拒否された場合、HTTP ステータスコード 503 とエラーメッセージ reached concurrency limit が返されます。

最小ラウンドトリップ時間 (MinRTT) の定期的な計算中、接続数は min_concurrency パラメーターで指定された小さな値に制限されます。 サービスの ASMAdaptiveConcurrency CRD を作成した後、宛先ルールを作成してサービスの再試行機能を有効にすることをお勧めします。 これにより、MinRTT 計算中に拒否されたリクエストは、サイドカープロキシの再試行に基づいて可能な限り処理できます。

手順 1:サンプルアプリケーションをデプロイする

testserver アプリケーションと gotest アプリケーションをデプロイします。 testserver アプリケーションの負荷容量を 500 の同時リクエストに設定します。 同時実行制限を超えるリクエストは、処理のためにキューに入れられます。 各リクエストの処理に必要な時間を 1000 ミリ秒に設定します。 gotest アプリケーションの各レプリカが一度に 200 リクエストを開始するように設定します。

  1. testserver アプリケーションをデプロイします。

    1. 次の内容を含む testserver.yaml ファイルを作成します。

      詳細を表示するには展開します

      apiVersion: apps/v1
      kind: Deployment
      metadata:
        labels:
          app: testserver
        name: testserver
        namespace: default
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: testserver
        template:
          metadata:
            creationTimestamp: null
            labels:
              app: testserver
          spec:
            containers:
            - args:
              - -m
              - "500"  # アプリケーションがサポートする同時リクエストの最大数を指定します。
              - -t
              - "1000" # 各リクエストの処理に必要な時間を指定します。
              command:
              - /usr/local/bin/limited-concurrency-http-server
              image: registry.cn-hangzhou.aliyuncs.com/acs/asm-limited-concurrency-http-server:v0.1.1-gee0b08f-aliyun
              imagePullPolicy: IfNotPresent
              name: testserver
              ports:
              - containerPort: 8080
                protocol: TCP

      -m パラメーターは、アプリケーションがサポートする同時リクエストの最大数を指定します。 -t パラメーターは、各リクエストの処理に必要な時間を指定します。

    2. 次のコマンドを実行して、testserver アプリケーションをデプロイします。

      kubectl apply -f testserver.yaml
  2. testserver アプリケーションに testserver という名前のサービスをデプロイします。

    1. 次の内容を含む testservice.yaml ファイルを作成します。

      詳細を表示するには展開します

      apiVersion: v1
      kind: Service
      metadata:
        labels:
          app: testserver
        name: testserver
        namespace: default
      spec:
        internalTrafficPolicy: Cluster
        ipFamilies:
          - IPv4
        ipFamilyPolicy: SingleStack
        ports:
          - name: http
            port: 8080
            protocol: TCP
            targetPort: 8080
          - name: metrics
            port: 15020
            protocol: TCP
            targetPort: 15020
        selector:
          app: testserver
        type: ClusterIP
                                      
    2. 次のコマンドを実行して、testserver サービスをデプロイします。

      kubectl apply -f testservice.yaml
  3. gotest アプリケーションをデプロイします。

    1. 次の内容を含む gotest.yaml ファイルを作成します。

      詳細を表示するには展開します

      apiVersion: apps/v1
      kind: Deployment
      metadata:
        labels:
          app: gotest
        name: gotest
        namespace: default
      spec:
        replicas: 0
        selector:
          matchLabels:
            app: gotest
        template:
          metadata:
            creationTimestamp: null
            labels:
              app: gotest
          spec:
            containers:
            - args:
              - -c
              - "200" # 一度に開始するリクエスト数を指定します。
              - -n
              - "10000"
              - -u
              - testserver:8080
              command:
              - /root/go-stress-testing-linux
              image: xocoder/go-stress-testing-linux:v0.1
              imagePullPolicy: Always
              name: gotest
              resources:
                limits:
                  cpu: 500m
    2. 次のコマンドを実行して、gotest アプリケーションをデプロイします。

      kubectl apply -f gotest.yaml

手順 2:ASMAdaptiveConcurrency CRD を作成する

  1. kubectl を使用して ASM インスタンスに接続します。 詳細については、「コントロールプレーンで kubectl を使用して Istio リソースにアクセスする」をご参照ください。

  2. adaptiveconcurrency.yaml ファイルを作成し、以下の内容を記述します。

    詳細を表示するには展開します

    apiVersion: istio.alibabacloud.com/v1beta1
    kind: ASMAdaptiveConcurrency
    metadata:
        name: sample-adaptive-concurrency
        namespace: default
    spec:
        workload_selector:
            labels:
                app: testserver
        sample_aggregate_percentile:
            value: 60 # サンプリングパーセンタイル値。 0 から 100 までの有効な値。
        concurrency_limit_params:
            max_concurrency_limit: 500 # 同時実行制限。許可される同時リクエストの最大数。デフォルト値:1000。
            concurrency_update_interval: 15s # 同時実行制限を更新する間隔。例:60s。
        min_rtt_calc_params:
            interval: 60s # MinRTT を計算する間隔。例:120s。
            request_count: 100 # MinRTT の計算に使用されるリクエスト数。デフォルト値:50。
            jitter:
                value: 15 # MinRTT を計算する間隔にランダムなジッターを追加するために使用されるパーセンテージ。たとえば、interval パラメーターが 120s に設定され、jitter パラメーターが 50 に設定されている場合、MinRTT を計算する間隔は random(120, 120 + (120 × 50%)) です。デフォルト値:15。
            min_concurrency: 50 # MinRTT の計算に使用される同時リクエストの数。この値は、同時実行コントローラーの初期同時実行制限でもあります。サービスの負荷容量よりもはるかに低い値にする必要があります。これにより、MinRTT 計算中に最小レイテンシで応答が返されるようになります。デフォルト値:3。
            buffer:
                value: 25 # 適切なレイテンシの変動範囲。値はパーセンテージです。たとえば、100 ミリ秒のレイテンシの周りの 10% の変動が妥当な範囲内にある場合は、このパラメーターを 10 に設定します。デフォルト値:25。
    

    パラメーター

    タイプ

    説明

    必須

    workload_selector

    WorkloadSelector

    使用するポッドの選択方法を定義するワークロードセレクター。

    はい

    labels

    map

    選択するポッドと一致させるために使用されるラベル。

    はい

    sample_aggregate_percentile

    Percent

    サンプリングパーセンタイル。 リクエストはこのパーセンタイルに基づいてサンプリングされ、サンプルラウンドトリップ時間 (SampleRTT) が計算されます。

    はい

    value

    int

    パーセンタイル値。 有効な値:0~100。

    はい

    concurrency_limit_params

    ConcurrencyLimitParams

    同時実行制限に関連する構成。

    はい

    max_concurrency_limit

    int

    同時実行制限。許可される同時リクエストの最大数。 デフォルト値:1000。

    いいえ

    concurrency_update_interval

    duration

    同時実行制限を更新する間隔。 例:60s。

    はい

    min_rtt_calc_params

    MinRTTCalcParams

    MinRTT 計算に関連する構成。

    はい

    interval

    duration

    MinRTT を計算する間隔。 例:120s。

    いいえ

    request_count

    int

    MinRTT の計算に使用されるリクエスト数。 デフォルト値:50。

    いいえ

    jitter

    Percent

    MinRTT を計算する間隔にランダムなジッターを追加するために使用されるパーセンテージ。 たとえば、interval パラメーターが 120s に設定され、jitter パラメーターが 50 に設定されている場合、MinRTT を計算する間隔は random(120, 120 + (120 × 50%)) です。 デフォルト値:15。

    いいえ

    min_concurrency

    int

    MinRTT の計算に使用される同時リクエストの数。 この値は、同時実行コントローラーの初期同時実行制限でもあります。 このパラメーターの値は、サービスの負荷容量よりもはるかに低い必要があります。 これにより、MinRTT 計算中に最小レイテンシで応答が返されるようになります。 デフォルト値:3。

    いいえ

    buffer

    Percent

    適切なレイテンシの変動範囲。 値はパーセンテージです。 たとえば、100 ミリ秒のレイテンシの周りの 10% の変動が妥当な範囲内にある場合は、このパラメーターを 10 に設定します。 デフォルト値:25。

    いいえ

  3. 次のコマンドを実行して、ASMAdaptiveConcurrency CRD を作成します。

    kubectl apply -f adaptiveconcurrency.yaml

手順 3:Managed Service for Prometheus を有効にする

同時実行コントローラーの実行状態を理解し、パラメーターを最適化するために、アダプティブ同時実行制御に関連するメトリックを Managed Service for Prometheus にエクスポートできます。 Managed Service for Prometheus コンソールで同時実行コントローラーの実行状態を確認できます。

  1. Managed Service for Prometheus を有効にします。 詳細については、「Managed Service for Prometheus を使用する」をご参照ください。

  2. Managed Service for Prometheus が testserver サービスのデータを取得できるように、クラスタで ServiceMonitor を構成します。

    1. 次の内容を含む servicemonitor.yaml ファイルを作成します。

      apiVersion: monitoring.coreos.com/v1
      kind: ServiceMonitor
      metadata:
        name: testserver-envoy-metrics
        namespace: default
      spec:
        endpoints:
          - interval: 5s
            path: /stats/prometheus
            port: metrics
        namespaceSelector:
          any: true
        selector:
          matchLabels:
            app: testserver
    2. kubeconfig ファイルの情報に基づいて kubectl を使用して ACK クラスタに接続し、次のコマンドを実行して ServiceMonitor を作成します。

      kubectl apply -f servicemonitor.yaml

手順 4:ASMAdaptiveConcurrency CRD が有効になっていることを確認する

  1. gotest アプリケーションのレプリカ数を 5 に設定します。

    gotest アプリケーションのレプリカは一度に 200 リクエストを開始します。 アプリケーションの 5 つのレプリカは、合計で一度に 1,000 リクエストを開始します。

    1. ACK コンソール にログインします。 左側のナビゲーションウィンドウで、[クラスタ] をクリックします。

    2. [クラスタ] ページで、管理するクラスタを見つけ、クラスタの名前をクリックするか、詳細[操作] 列の をクリックします。 クラスタの詳細ページが表示されます。

    3. 詳細ページの左側のナビゲーションウィンドウで、[ワークロード] > [デプロイメント] を選択します。

    4. [デプロイメント] ページで、[名前空間] を default に設定し、gotest アプリケーションの [詳細] > [YAML で表示][操作] 列で gotest を選択します。

    5. [YAML の編集] ダイアログボックスで、replicas5 に設定し、[更新] をクリックします。

  2. 次の JSON ファイルをアップロードして、Grafana ダッシュボードをインポートします。 インポートされたダッシュボードで同時実行コントローラーの実行状態を確認できます。 詳細については、「ARMS ドキュメント」をご参照ください。

    JSON ファイルを表示するには展開します

    {
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": "-- Grafana --",
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "description": "ASM アダプティブ同時実行のモニタリング",
      "editable": true,
      "gnetId": 6693,
      "graphTooltip": 0,
      "id": 3239002,
      "iteration": 1651922323976,
      "links": [],
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$cluster",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 0
          },
          "hiddenSeries": false,
          "id": 22,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.0-pre",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_http_inbound_0_0_0_0_80_adaptive_concurrency_gradient_controller_rq_blocked{service=\"$service\", pod=\"$pod\"}",
              "interval": "",
              "legendFormat": "{{service}}-{{pod}}",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "ブロックされたリクエスト数",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$cluster",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 0
          },
          "hiddenSeries": false,
          "id": 24,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.0-pre",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_burst_queue_size{service=\"$service\", pod=\"$pod\"}",
              "format": "time_series",
              "interval": "",
              "legendFormat": "{{service}}-{{pod}}",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "ヘッドルーム",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$cluster",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 8
          },
          "hiddenSeries": false,
          "id": 26,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.0-pre",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_concurrency_limit{service=\"$service\",pod=\"$pod\"}",
              "interval": "",
              "legendFormat": "{{service}}-{{pod}}",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "同時実行制限",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$cluster",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 8
          },
          "hiddenSeries": false,
          "id": 28,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.0-pre",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_gradient{service=\"$service\",pod=\"$pod\"}",
              "interval": "",
              "legendFormat": "{{service}}-{{pod}}",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "勾配",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$cluster",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 16
          },
          "hiddenSeries": false,
          "id": 32,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.0-pre",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_min_rtt_msecs{service=\"$service\",pod=\"$pod\"}",
              "interval": "",
              "legendFormat": "{{service}}-{{pod}}",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "最小 RTT(ミリ秒)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ms",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "$cluster",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 16
          },
          "hiddenSeries": false,
          "id": 34,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.0-pre",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_sample_rtt_msecs{service=\"$service\",pod=\"$pod\"}",
              "interval": "",
              "legendFormat": "{{service}}-{{pod}}",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "サンプル RTT(ミリ秒)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ms",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "test-adaptive-concurrency_1217520382582089",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 24
          },
          "hiddenSeries": false,
          "id": 30,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.4.0-pre",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_min_rtt_calculation_active{service=\"$service\",pod=\"$pod\"}",
              "interval": "",
              "legendFormat": "{{service}}-{{pod}}",
              "queryType": "randomWalk",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "最小 RTT 計算",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        }
      ],
      "refresh": "5s",
      "schemaVersion": 26,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "current": {
              "selected": true,
              "text": "edas120_1217520382582089",
              "value": "edas120_1217520382582089"
            },
            "error": null,
            "hide": 0,
            "includeAll": false,
            "label": null,
            "multi": false,
            "name": "cluster",
            "options": [],
            "query": "prometheus",
            "queryValue": "",
            "refresh": 1,
            "regex": "",
            "skipUrlSync": false,
            "type": "datasource"
          },
          {
            "allValue": null,
            "current": {
              "isNone": true,
              "selected": false,
              "text": "None",
              "value": ""
            },
            "datasource": "$cluster",
            "definition": "label_values(envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_burst_queue_size,service)",
            "error": null,
            "hide": 0,
            "includeAll": false,
            "label": null,
            "multi": false,
            "name": "service",
            "options": [],
            "query": "label_values(envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_burst_queue_size,service)",
            "refresh": 2,
            "regex": "",
            "skipUrlSync": false,
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          },
          {
            "allValue": null,
            "current": {
              "selected": false,
              "text": "All",
              "value": "$__all"
            },
            "datasource": "$cluster",
            "definition": "label_values(envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_concurrency_limit, pod)",
            "error": null,
            "hide": 0,
            "includeAll": true,
            "label": null,
            "multi": true,
            "name": "pod",
            "options": [],
            "query": "label_values(envoy_http_inbound_0_0_0_0_8080_adaptive_concurrency_gradient_controller_concurrency_limit, pod)",
            "refresh": 2,
            "regex": "",
            "skipUrlSync": false,
            "sort": 0,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-15m",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
          "5s",
          "10s",
          "30s",
          "1m",
          "5m",
          "15m",
          "30m",
          "1h",
          "2h",
          "1d"
        ],
        "time_options": [
          "5m",
          "15m",
          "1h",
          "6h",
          "12h",
          "24h",
          "2d",
          "7d",
          "30d"
        ]
      },
      "timezone": "",
      "title": "ASM アダプティブ同時実行",
      "uid": "000000084",
      "version": 3
    }
  3. ダッシュボードで、ASMAdaptiveConcurrency CRD が存在するクラスタを選択します。 [サービス] パラメーターを testserver に、[ポッド] パラメーターを ALL に設定します。

    gotest アプリケーションは testserver サービスに 1,000 リクエストを開始しますが、testserver サービスによって処理される同時リクエストの数は 500 未満です。 これは、ASMAdaptiveConcurrency CRD が有効になっていることを示しています。