AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

インテリジェントなワークロードマネジメント

注意

このページは、Atlas InfiniteとAtlas Coreの両方に適用されます。

最新のアプリケーションは、トラフィックが急増したり、負荷の高いクエリが予想以上のリソースを消費したりしても、可用性を維持する必要があります。Intelligent ワークロード マネジメント (IWM) は、MongoDB Atlas マネージド可用性機能であり、過負荷状態でもクラスターの応答性と予測可能性を維持します。

クラスターがリソースで処理できる以上の操作を受け取ると、過負荷が発生します。過負荷は、インフラストラクチャが増やすよりも速く発生する可能性があります。オートスケーリングを有効にしても、Atlasが追加のキャパシティーをプロビジョニングするには時間がかかります。これにより、すべての操作を同じように扱うとクラスターが不安定になる可能性があるウィンドウが開かれます。IWMは、ワークロードの急増とリソースの負荷をリアルタイムでモニタリングして対応することで、そのウィンドウを閉じます。

IWMは、MongoDB 9.0以降を実行するすべての専有クラスターにAtlasが適用する過負荷保護システムです。IWMには、以下の保護機能が含まれています。

  • Always-on protections queue, slow down, and prioritize operations to prevent them from overwhelming the cluster. These protections form a baseline of defense against overload. To learn more, see Always-On Protections.

  • Load Shedding is an optional protection that rejects incoming database operations in response to sustained overload. To learn more, see Load Shedding.

Atlas applies a subset of these protections to each cluster, based on the cluster's tier, topology, MongoDB version, and Load Shedding configuration. To learn more, see Cluster and Version Requirements.

Always-on protections are the baseline set of IWM protections that Atlas applies to absorb overload and maintain availability. These protections run at all times, even when Load Shedding is disabled, and you can't turn them off. To learn which of these protections apply to your cluster, see Cluster and Version Requirements.

  • Ingress queueing: Atlas runs an ingress request rate limiter on each mongod process in your cluster, which determines how quickly each process admits operations for execution. When a traffic spike outlasts your cluster's reserved capacity, the rate limiter adds excess incoming operations to an ingress queue instead of letting them compete for resources with running operations. If resource use stays high, the rate limiter admits operations at a slower rate, so more operations wait in the queue. The rate limiter rejects operations only if you enable Load Shedding on your cluster.

    クラスターでリアクティブなオートスケーリングが有効になっている場合、Atlasはキューに入れられた操作の割合を使用して、クラスターを増やすタイミングを決定します。Atlasは、このレートをAtlasメトリクスの操作 Rate Limiting: Queued 操作として報告します。詳細については、「Atlas がクラスター階層をスケーリングする方法」を参照してください。

  • 実行制御の優先順位付け: オーバーロード時には、Atlas は、バックグラウンドタスクと長時間の操作の優先順位を下げることで、短時間の読み取りと書き込み (write)が引き続き進行するようにサポポートします。長時間クエリは、その業務上の重要度にかかわらず、完了までにより時間がかかる可能性があります。負荷が高い状況では、Atlas はまず、コストの高い操作、実行時間の長い操作、または優先順位の低い操作を制限します。

  • キャッシュの削除とメモリのチューニング: Atlasは、クラスターがメモリを使用し、キャッシュされたデータを削除する方法を調整します。メモリが不足すると、クラスターはメモリ不足になったり、最も必要なデータを繰り返しクリアしたりする代わりに、制御された方法で速度を低下させます。

  • 接続レート制限: 接続ストーム中、Atlas は既存の接続を維持しながら、新しいクライアント接続を安全なレートで認め、過剰な接続リクエストを拒否します。詳細については、接続レート制限を参照してください。

  • Write-blocking: On Atlas Core clusters, if the primary node runs critically low on free disk space, Atlas blocks write operations on the replica set. Atlas continues to serve reads while writes are blocked. Blocked write operations include delete operations, because deleting documents can temporarily increase used disk space. On sharded clusters, Atlas blocks only writes routed to the affected shard.

    ノードの合計ディスクサイズによって、Atlasが適用するしきい値が決まります。次の表に、各ディスクサイズ範囲のしきい値を示します。

    合計ディスクサイズ
    閾値

    8 GiB ~ 20 GiB

    Atlas は、空きディスク容量が 600 MiB を下回った場合、書き込み (write)をブロックします。Atlas は、ディスクの空き容量が 900 MiB を超えた場合に書き込み (write)のブロックを解除します。

    20 GiB から 1.25 TiB まで

    Atlasは、空きディスク容量が合計ディスクサイズの4%を下回ると、書き込み (write)をブロックします。Atlasは、空きディスク容量が合計ディスクサイズの6%を超えると、書き込み (write)のブロックを解除します。

    1.257600 TiB 以上

    Atlasは、空きディスク容量が50 GiBを下回ると書き込み (write)をブロックします。Atlasは、空きディスク容量が75 GiBを超えると書き込み (write)のブロックを解除します。

    ディスク容量を回復するには、クラスターのストレージを増やすか、ストレージのオートスケーリングを有効にしてください。

    Atlasが書き込み (write)をブロックすると、Atlasのログは書き込み (write)がブロックされていることを示すMongoServerErrorを返します。エラーコードと理由は、クラスターの機能の互換性バージョン(機能の互換性バージョン)によって異なります。

    • 機能の互換性バージョン 9.0以降のクラスターの場合、ログは次のようなMongoServerErrorを返します: Replica set writes blocked, reason: InsufficientDiskSpace。

    • 機能の互換性バージョンが9.0より前のクラスターの場合、ログは次のようなMongoServerErrorを返します: User writes blocked, reason: DiskUseThresholdExceeded。

    Atlas Infiniteクラスターでは、レプリカセットの論理データサイズがクラスターの最大ストレージ制限に近づくと、Atlasは書き込み (write)をブロックします。Atlas Infiniteクラスターのストレージ制限の詳細については、「Atlas Infiniteクラスターのストレージを管理する」を参照してください。

Load Shedding is an IWM protection that rejects incoming database operations as early as possible to limit their impact on the cluster. Unlike IWM's always-on protections, Load Shedding is optional, so you can control whether Atlas applies it to your cluster. When enabled, Load Shedding engages only during sustained overload, after other protections can't relieve enough pressure.

As part of IWM's always-on protections, Atlas runs an ingress request rate limiter on each mongod process in your cluster. This rate limiter admits operations into the process at a controlled rate, and adds any operation requests that arrive faster than this rate to an ingress queue on that process.

Load Sheddingが有効な場合、Atlasはクラスター内の各mongodプロセスのイングレスキューのサイズを制限します。プロセスのキューがいっぱいになっている間に操作が到着した場合、Atlasはその操作を過負荷エラーで拒否します。これにより、持続的な過負荷時にキューが大きくなりすぎるのを防ぎます。

When Load Shedding is disabled, Atlas doesn't bound the size of the ingress queue on any mongod process in your cluster or reject any operations that arrive faster than the rate limiter's admission rate. During sustained overload, each mongod process continues to add an unbounded number of operations to its queue, so operations take longer to complete.

クラスターでリアクティブなオートスケーリングが有効になっている場合、Atlas は Load Shedding が拒否した操作の割合を使用して、クラスターをいつ増やすかを決定します。Atlas は、この割合を Atlas メトリクスの 操作レート制限の下で Rejected Operations として報告します。詳細については、「Atlas がクラスター階層をスケーリングする方法」を参照してください。

注意

ロード シェルは、検索ロード シェルとは別物です。ロード シェルは、mongod プロセスでデータベース操作を拒否します。検索ロード シェルは、 プロセスでMongoDB Search およびMongoDBmongot ベクトル検索クエリを拒否します。 2 つの保護は独立しているため、どちらか一方を設定してももう 1 つは影響しません。詳しくは、以下を参照してください。

Load Shedding は、MongoDB 9.0 以降を実行している M30+ レプリカセットクラスターでのみ利用可能です。デフォルトでは、Atlas は Load Shedding 設定の値を Atlas Managed に設定します。これにより、Atlas はクラスターの Load Shedding の有効な状態を制御できます。MongoDB 9.0 では、その状態は Disabled です。

重要

有効にすると、Load Sheddingによってクラスターで過負荷エラーが発生する回数が増える可能性があります。これらのエラーの取り扱い方法を学ぶには、Load Sheddingによる過負荷エラーの取り扱いを参照してください。

クラスターで Load Shedding を構成するには、Atlas UI または Atlas Administration API を使用します。

Intelligent ワークロード マネジメント (IWM) は、MongoDB 9.0 以降を実行しているすべての専有クラスターで有効です。IWM は、無料クラスターまたはフレックス クラスターでは利用できません。

When IWM is active on a cluster, Atlas applies a subset of IWM protections based on the cluster's tier, topology, MongoDB version, and Load Shedding configuration. The following table lists the protections that Atlas applies to each combination of cluster tier and topology on MongoDB 9.0 and later:

IWM保護
M10 および M20 クラスター
M30+ レプリカセットクラスター
M30+ シャーディングされたクラスター

イングレスキューイング

No

はい

No

実行制御の優先順位付け

No

はい

No

キャッシュの削除とメモリのチューニング

はい

はい

はい

接続レート制限

はい

はい

はい

書き込みブロッキング

はい

はい

はい

ロード シェディング

No

Yes, when enabled

No

注意

MongoDB 9.0 の例外バージョンの要件

次の IWM 保護は、バージョン 9.0 以前の MongoDB が実行されているクラスター上で有効です:

  • 書き込み (write) ブロックは、MongoDB 8.0 以降を実行している M10+ クラスターでアクティブになります。

  • MongoDB 8.0 以降のバージョンを実行している M10+ クラスターでは、メモリチューニングが有効です。

  • キャッシュの削除は、以降の MongoDB 8.3.3 または、以降の MongoDB 8.0.28 が実行されている M10+ クラスターで有効です。

  • 接続レート制限は、次のMongoDBバージョンを実行しているM10およびM20クラスターでアクティブになります。

    • 7.0.237.06800以降および7900.xリリース

    • 8.0.128.06800以降および7900.xリリース

    • 8.1.28.16800以降および7900.xリリース

Atlasには、IWMがクラスターを保護しているタイミングや、Atlasが遅延または拒否した操作を確認できるいくつかのオブザーバビリティサーフェスが用意されています。