

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon DocumentDB 配額和限制
<a name="limits"></a>

本主題說明 Amazon DocumentDB （具有 MongoDB 相容性） 的資源配額、限制和命名限制。

對於某些管理功能，Amazon DocumentDB 使用與 Amazon Relational Database Service (Amazon RDS) 和 Amazon Neptune 共用的操作技術。

**Topics**
+ [

## 支援的執行個體類型
](#limits-suported_instance_types)
+ [

## 支援的 區域
](#limits-region_availability)
+ [

## 區域配額
](#limits-regional_quotas)
+ [

## 彙總限制
](#limits-aggregation)
+ [叢集限制](#limits-cluster)
+ [

## 執行個體限制
](#limits.instance)
+ [命名限制條件](#limits-naming_constraints)
+ [

## TTL 限制條件
](#limits.ttl-constraints)
+ [

## 彈性叢集限制
](#elastic.cluster.limits)
+ [

## 彈性叢集碎片限制
](#elastic.cluster.shard.limits)
+ [

## 每個碎片的彈性叢集 CPU、記憶體、連線和游標限制
](#elastic.cluster.memory.limits)

## 支援的執行個體類型
<a name="limits-suported_instance_types"></a>

Amazon DocumentDB 支援隨需執行個體和下列執行個體類型：
+ NVMe 後端：
  + **R6GD 執行個體類型：**`db.r6gd.xlarge`、`db.r6gd.2xlarge`、`db.r6gd.4xlarge`、`db.r6gd.8xlarge`、`db.r6gd.12xlarge`、`db.r6gd.16xlarge`。
+ 記憶體優化:
  + **R8G 執行個體類型：**`db.r8g.large`、`db.r8g.xlarge`、`db.r8g.2xlarge`、`db.r8g.4xlarge`、`db.r8g.8xlarge``db.r8g.12xlarge`、、`db.r8g.16xlarge`。
  + **R6G 執行個體類型：**`db.r6g.large`、`db.r6g.xlarge`、`db.r6g.2xlarge`、`db.r6g.4xlarge`、`db.r6g.8xlarge``db.r6g.12xlarge`、、`db.r6g.16xlarge`。
  + **R5 執行個體類型：**`db.r5.large`、`db.r5.xlarge`、`db.r5.2xlarge`、`db.r5.4xlarge`、`db.r5.8xlarge``db.r5.12xlarge`、、`db.r5.16xlarge`。
  + **R4 執行個體類型：**`db.r4.large`、`db.r4.2xlarge`、`db.r4.4xlarge`、`db.r4.8xlarge`、`db.r4.16xlarge`。
+ 爆量效能：
  + **T4G 執行個體類型：**`db.t4g.medium`。
  + **T3 執行個體類型：**`db.t3.medium`。

如需有關支援的執行個體類型及其規格的詳細資訊，請參閱[執行個體類別規格](db-instance-classes.md#db-instance-class-specs)。

## 支援的 區域
<a name="limits-region_availability"></a>

Amazon DocumentDB 可在下列 AWS 區域使用：


| 區域名稱 | 區域 | 可用區域 （運算） | 
| --- | --- | --- | 
| 美國東部 (俄亥俄) | `us-east-2` | 3 | 
| 美國東部 (維吉尼亞北部) | `us-east-1` | 6 | 
| 美國西部 (奧勒岡) | `us-west-2` | 4 | 
| 非洲 (開普敦) | `af-south-1` | 3 | 
| 南美洲 (聖保羅) | `sa-east-1` | 3 | 
| 亞太地區 (香港) | `ap-east-1` | 3 | 
| 亞太地區 (海德拉巴) | `ap-south-2` | 3 | 
| 亞太地區 (馬來西亞) | `ap-southeast-5` | 3 | 
| 亞太地區 (孟買) | `ap-south-1` | 3 | 
| 亞太地區 (大阪) | `ap-northeast-3` | 3 | 
| 亞太地區 (首爾) | `ap-northeast-2` | 4 | 
| 亞太地區 (新加坡) | `ap-southeast-1` | 3 | 
| 亞太地區 (悉尼) | `ap-southeast-2` | 3 | 
| 亞太地區 (雅加達) | `ap-southeast-3` | 3 | 
| 亞太地區 (墨爾本) | `ap-southeast-4` | 3 | 
| 亞太區域 (泰國) | `ap-southeast-7` | 3 | 
| 亞太地區 (東京) | `ap-northeast-1` | 3 | 
| 加拿大 (中部) | `ca-central-1` | 3 | 
| 中國 (北京) 區域 | `cn-north-1` | 3 | 
| 中國 (寧夏) | `cn-northwest-1` | 3 | 
| 歐洲 (法蘭克福) | `eu-central-1` | 3 | 
| 歐洲 (蘇黎世) | `eu-central-2` | 3 | 
| 歐洲 (愛爾蘭) | `eu-west-1` | 3 | 
| 歐洲 (倫敦) | `eu-west-2` | 3 | 
| 歐洲 (米蘭) | `eu-south-1` | 3 | 
| Europe (Paris) | `eu-west-3` | 3 | 
| 歐洲 (西班牙) | `eu-south-2` | 3 | 
| 歐洲 (斯德哥爾摩) | `eu-north-1` | 3 | 
| 墨西哥 (中部) | `mx-central-1` | 3 | 
| 中東 (阿拉伯聯合大公國) | `me-central-1` | 3 | 
| 以色列 (特拉維夫) | `il-central-1` | 3 | 
| AWS GovCloud （美國西部） | `us-gov-west-1` | 3 | 
| AWS GovCloud （美國東部） | `us-gov-east-1` | 3 | 

## 區域配額
<a name="limits-regional_quotas"></a>

對於某些管理功能，Amazon DocumentDB 使用與 Amazon Relational Database Service (Amazon RDS) 共享的操作技術。下表包含 Amazon DocumentDB 和 Amazon RDS 之間共用的區域限制。

**注意**  
上述 Amazon RDS 共用技術僅適用於 Amazon DocumentDB 執行個體型叢集。Amazon DocumentDB 彈性叢集不會與 Amazon RDS 共用技術。

下列限制適用於 Amazon DocumentDB 執行個體型叢集，每個區域每個 AWS 帳戶。


| 資源 | AWS 預設限制 | 
| --- | --- | 
| 叢集 | 40 | 
| 叢集參數群組 | 50 | 
| 每個參數群組的叢集 | 100 | 
| 每個參數群組的執行個體 | 300 | 
| 事件訂閱 | 20 | 
| 執行個體 | 40 | 
| 手動叢集快照 | 100 | 
| 僅供讀取複本數 (每個叢集) | 15 | 
| 子網路群組 | 50 | 
| 每個子網路群組的子網路 | 20 | 
| 每個資源的標籤 | 50 | 
| 每個執行個體的 VPC 安全群組 | 5 | 

下列限制適用於 Amazon DocumentDB 彈性叢集，每個區域每個 AWS 帳戶。


| 資源 | AWS 預設限制 | 
| --- | --- | 
| 彈性叢集 | 20 | 
| 彈性叢集 vCPU | 1024 | 
| 手動彈性叢集快照 | 20 | 

如果配額可調整，您可以使用 Service Quotas 要求增加配額。有些請求會自動解決，有些則提交至 支援。您可以追蹤提交到的配額增加請求的狀態 支援。增加服務配額的請求不會獲得優先支援。如果您有緊急請求，請聯絡 [支援](https://aws.amazon.com/premiumsupport/)。如需服務配額的詳細資訊，請參閱[什麼是服務配額？](https://docs.aws.amazon.com//servicequotas/latest/userguide/intro.html)

**若要請求提高 Amazon DocumentDB 的配額：**

1. 在 [https://console.aws.amazon.com/servicequotas](https://console.aws.amazon.com/servicequotas) 開啟 Service Quotas (服務配額) 主控台，如有需要，請登入。

1. 在導覽窗格中，選擇 **AWS services** (AWS 服務)。

1. 從清單中選擇 Amazon DocumentDB （與 MongoDB 相容性） 或 Amazon DocumentDB Elastic Cluster，或在搜尋欄位中輸入其中一項。

1. 如果配額可調整，您可以選取其選項按鈕或名稱，然後選擇頁面右上角的 **Request quota increase (請求增加配額)**。

1. 對於 **Change quota value (變更配額值)**，輸入新值。新值必須大於目前的值。

1. 選擇**請求**。解決請求之後，配額的 **Applied quota value (套用的配額值)** 會設定為新值。

1. 若要檢視任何擱置或最近解決的請求，請從瀏覽窗格中選擇 **Dashboard (儀表板)**。對於擱置的請求，請選擇請求狀態以開啟請求回條。請求的初始狀態為 `Pending`。狀態變更為 後`Quota requested`，您會看到 的案例編號 支援。選擇案例編號，為請求開啟票證。

## 彙總限制
<a name="limits-aggregation"></a>

下表說明 Amazon DocumentDB 中的彙總限制。


| 資源 | 限制 | 
| --- | --- | 
| 支援之階段數上限 | 500 | 

## 叢集限制
<a name="limits-cluster"></a>

下表說明 Amazon DocumentDB 執行個體型叢集限制。


| 資源 | 限制 | 
| --- | --- | 
| 叢集大小 (所有集合和索引的總和) | 128 TiB | 
| 集合大小 （所有集合的總和不可超過叢集限制） – 不包含索引大小 | 32 TiB | 
| 每個叢集的集合 | 100,000 | 
| 每個叢集的資料庫數量 | 100,000 | 
| 資料庫大小 (所有資料庫的總和不得超過叢集限制) | 128 TiB | 
| 文件巢狀深度 | 200 個層級 | 
| 文件大小 | 16 MiB | 
| 索引鍵大小 | 2048 個位元組 | 
| 每個集合的索引 | 64 | 
| 在複合索引的索引鍵 | 32 | 
| 單一批次命令中的寫入次數上限 | 100,000 | 
| 每個叢集的使用者數目 | 1000 | 

## 執行個體限制
<a name="limits.instance"></a>

下表說明每個執行個體的 Amazon DocumentDB 限制。

------
#### [ Amazon DocumentDB 8.0 ]


| 執行個體類型 | 執行個體記憶體 (GiB) | 連線 （全部） | 游標限制 | 開啟交易 | 連線 （作用中） | 
| --- | --- | --- | --- | --- | --- | 
| T3.medium | 4 | 1000 | 30 | 50 | 102 | 
| T4G.medium | 4 | 1000 | 30 | 50 | 102 | 
| R5.large | 16 | 3400 | 450 | 200 | 1100 | 
| R5.xlarge | 32 | 7000 | 450 | 400 | 2700 | 
| R5.2xlarge | 64 | 14200 | 450 | 800 | 4500 | 
| R5.4xlarge | 128 | 28400 | 760 | 1600 | 4500 | 
| R5.8xlarge | 256 | 60000 | 1520 | 3200 | 4500 | 
| R5.12xlarge | 384 | 60000 | 2280 | 4800 | 4500 | 
| R5.16xlarge | 512 | 60000 | 3040 | 6400 | 4500 | 
| R6G.large\$1 | 16 | 3400 | 450 | 200 | 1100 | 
| R6G.xlarge\$1 | 32 | 7000 | 450 | 400 | 2700 | 
| R6G.2xlarge\$1 | 64 | 14200 | 450 | 800 | 4500 | 
| R6G.4xlarge\$1 | 128 | 28400 | 760 | 1600 | 4500 | 
| R6G.8xlarge\$1 | 256 | 60000 | 1520 | 3200 | 4500 | 
| R6G.12xlarge\$1 | 384 | 60000 | 2280 | 4800 | 4500 | 
| R6G.16xlarge\$1 | 512 | 60000 | 3040 | 6400 | 4500 | 
| R8G.large | 16 | 3400 | 450 | 200 | 1100 | 
| R8G.xlarge | 32 | 7000 | 450 | 400 | 2700 | 
| R8G.2xlarge | 64 | 14200 | 450 | 800 | 4500 | 
| R8G.4xlarge | 128 | 28400 | 760 | 1600 | 4500 | 
| R8G.8xlarge | 256 | 60000 | 1520 | 3200 | 4500 | 
| R8G.12xlarge | 384 | 60000 | 2280 | 4800 | 4500 | 
| R8G.16xlarge | 512 | 60000 | 3040 | 6400 | 4500 | 

\$1 包括 R6GD

------
#### [ Amazon DocumentDB 5.0 ]


| 執行個體類型 | 執行個體記憶體 (GiB) | 連線 （全部） | 游標限制 | 開啟交易 | 連線 （作用中） | 
| --- | --- | --- | --- | --- | --- | 
| T3.medium | 4 | 1000 | 30 | 50 | 102 | 
| T4G.medium | 4 | 1000 | 30 | 50 | 102 | 
| R5.large | 16 | 3400 | 450 | 200 | 1100 | 
| R5.xlarge | 32 | 7000 | 450 | 400 | 2700 | 
| R5.2xlarge | 64 | 14200 | 450 | 800 | 4500 | 
| R5.4xlarge | 128 | 28400 | 760 | 1600 | 4500 | 
| R5.8xlarge | 256 | 60000 | 1520 | 3200 | 4500 | 
| R5.12xlarge | 384 | 60000 | 2280 | 4800 | 4500 | 
| R5.16xlarge | 512 | 60000 | 3040 | 6400 | 4500 | 
| R6G.large\$1 | 16 | 3400 | 450 | 200 | 1100 | 
| R6G.xlarge\$1 | 32 | 7000 | 450 | 400 | 2700 | 
| R6G.2xlarge\$1 | 64 | 14200 | 450 | 800 | 4500 | 
| R6G.4xlarge\$1 | 128 | 28400 | 760 | 1600 | 4500 | 
| R6G.8xlarge\$1 | 256 | 60000 | 1520 | 3200 | 4500 | 
| R6G.12xlarge\$1 | 384 | 60000 | 2280 | 4800 | 4500 | 
| R6G.16xlarge\$1 | 512 | 60000 | 3040 | 6400 | 4500 | 
| R8G.large | 16 | 3400 | 450 | 200 | 1100 | 
| R8G.xlarge | 32 | 7000 | 450 | 400 | 2700 | 
| R8G.2xlarge | 64 | 14200 | 450 | 800 | 4500 | 
| R8G.4xlarge | 128 | 28400 | 760 | 1600 | 4500 | 
| R8G.8xlarge | 256 | 60000 | 1520 | 3200 | 4500 | 
| R8G.12xlarge | 384 | 60000 | 2280 | 4800 | 4500 | 
| R8G.16xlarge | 512 | 60000 | 3040 | 6400 | 4500 | 

\$1 包括 R6GD

------
#### [ Amazon DocumentDB 4.0 ]


| 執行個體類型 | 執行個體記憶體 (GiB) | 連線 （全部） | 游標限制 | 開啟交易 | 連線 （作用中） | 
| --- | --- | --- | --- | --- | --- | 
| T3.medium | 4 | 1000 | 30 | 50 | 102 | 
| T4G.medium | 4 | 1000 | 30 | 50 | 102 | 
| R5.large | 16 | 3400 | 450 | 200 | 1100 | 
| R5.xlarge | 32 | 7000 | 450 | 400 | 2700 | 
| R5.2xlarge | 64 | 14200 | 450 | 800 | 4500 | 
| R5.4xlarge | 128 | 28400 | 760 | 1600 | 4500 | 
| R5.8xlarge | 256 | 60000 | 1520 | 3200 | 4500 | 
| R5.12xlarge | 384 | 60000 | 2280 | 4800 | 4500 | 
| R5.16xlarge | 512 | 60000 | 3040 | 6400 | 4500 | 
| R6G.large\$1 | 16 | 3400 | 450 | 200 | 1100 | 
| R6G.xlarge\$1 | 32 | 7000 | 450 | 400 | 2700 | 
| R6G.2xlarge\$1 | 64 | 14200 | 450 | 800 | 4500 | 
| R6G.4xlarge\$1 | 128 | 28400 | 760 | 1600 | 4500 | 
| R6G.8xlarge\$1 | 256 | 60000 | 1520 | 3200 | 4500 | 
| R6G.12xlarge\$1 | 384 | 60000 | 2280 | 4800 | 4500 | 
| R6G.16xlarge\$1 | 512 | 60000 | 3040 | 6400 | 4500 | 

\$1 包括 R6GD

------
#### [ Amazon DocumentDB 3.6 ]


| 執行個體類型 | 執行個體記憶體 (GiB) | 連線 （全部） | 游標限制 | 開啟交易 | 連線 （作用中） | 
| --- | --- | --- | --- | --- | --- | 
| T3.medium | 4 | 500 | 30 | N/A | 102 | 
| R4.large | 15.25 | 1700 | 450 | N/A | 1100 | 
| R4.xlarge | 30.5 | 3400 | 450 | N/A | 2700 | 
| R4.2xlarge | 61 | 6800 | 450 | N/A | 4500 | 
| R4.4xlarge | 122 | 13600 | 725 | N/A | 4500 | 
| R4.8xlarge | 288 | 27200 | 1450 | N/A | 4500 | 
| R4.16xlarge | 488 | 30000 | 2900 | N/A | 4500 | 
| R5.large | 16 | 1700 | 450 | N/A | 1100 | 
| R5.xlarge | 32 | 3500 | 450 | N/A | 2700 | 
| R5.2xlarge | 64 | 7100 | 450 | N/A | 4500 | 
| R5.4xlarge | 128 | 14200 | 760 | N/A | 4500 | 
| R5.8xlarge | 256 | 28400 | 1520 | N/A | 4500 | 
| R5.12xlarge | 384 | 30000 | 2280 | N/A | 4500 | 
| R5.16xlarge | 512 | 30000 | 3040 | N/A | 4500 | 

------

您可以使用下列 CloudWatch 指標，監控和警示每個執行個體限制的 。如需 Amazon DocumentDB CloudWatch 指標的詳細資訊，請參閱[使用 CloudWatch 監控 Amazon DocumentDB](cloud_watch.md)。


| 資源 | CloudWatch 限制指標 | CloudWatch 用量指標 （最多 1 分鐘） | CloudWatch 用量指標 | 
| --- | --- | --- | --- | 
| 執行個體記憶體 | - | - | FreeableMemory | 
| 連線 （全部） | DatabaseConnectionsLimit | DatabaseConnectionsMax | DatabaseConnections | 
| 游標 | DatabaseCursorsLimit | DatabaseCursorsMax | DatabaseCursors | 
| 交易 | TransactionsOpenLimit | TransactionsOpenMax | TransactionsOpen | 

## 命名限制條件
<a name="limits-naming_constraints"></a>

下表說明 Amazon DocumentDB 中的命名限制。


| 資源 | 預設值限制 | 
| --- | --- | 
| 叢集識別碼 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/documentdb/latest/developerguide/limits.html)  | 
| 集合名稱：<col> |  長度為 【1–57】 個字元。  | 
| 資料庫名稱：<db> |  長度為 【1–63】 個字元。  | 
| 完整集合名稱：<db>.<col> | 長度為 【3–120】 個字元。 | 
| 完整索引名稱：<db>.<col>\$1<index> | 長度為 【6–377】 個字元。 | 
| 索引名稱：<col>\$1<index> |  長度為 【3–255】 個字元。  | 
| 執行個體識別碼 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/documentdb/latest/developerguide/limits.html)  | 
| 主要密碼 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/documentdb/latest/developerguide/limits.html) | 
| 主要使用者名稱 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/documentdb/latest/developerguide/limits.html)  | 
| 參數群組名稱 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/documentdb/latest/developerguide/limits.html) | 

## TTL 限制條件
<a name="limits.ttl-constraints"></a>

在特定時間範圍內無法保證可從 TTL 索引中刪除，而且這是最佳作法。像是執行個體資源使用率、文件大小和整體輸送量等因素，都會影響 TTL 刪除的時間。

## 彈性叢集限制
<a name="elastic.cluster.limits"></a>

下表說明 Amazon DocumentDB 彈性叢集的最大限制。


| 資源 | 限制 | 
| --- | --- | 
| 每個區域的彈性叢集 | 20 | 
| 每個區域所有彈性叢集的 vCPU 加總 | 1024 | 
| 每個區域的手動叢集快照 | 20 | 
| 每個叢集的碎片 | 32 | 
| 每個叢集的儲存體 （當資料由碎片金鑰平均分佈時） | 4 PiB | 
| 叢集的連線 | 每個碎片 300，000 個或碎片數量的較低值 x 與 vCPU 相關聯的連線限制 | 
| UnSharded集合大小 | 32 TiB | 
| 碎片收集大小 （當資料由碎片索引鍵平均分佈時） | 1PB | 
| 每個叢集的資料庫數量 | 10,000 | 
| 每個叢集UnSharded集合 | 100,000 | 
| 每個叢集的碎片集合 | 1000 | 
| 每個叢集的使用者 | 100 | 
| 在單一批次命令中寫入 | 100,000 | 
| 每個集合的索引 | 64 | 
| 文件巢狀深度 | 100 個層級 | 
| 文件大小 | 16MB | 
| 索引鍵大小 | 2048 位元組 | 
| 在複合索引的索引鍵 | 32 | 

## 彈性叢集碎片限制
<a name="elastic.cluster.shard.limits"></a>

下表說明 Amazon DocumentDB 彈性叢集中的最大碎片限制。


| 資源 | 限制 | 
| --- | --- | 
| 每個碎片執行個體的 vCPU | 64 | 
| 每個碎片的執行個體數 | 16 | 
| 每個碎片的儲存體 | 128 TiB | 
| 每個碎片每個集合的儲存體 | 32 TiB | 

## 每個碎片的彈性叢集 CPU、記憶體、連線和游標限制
<a name="elastic.cluster.memory.limits"></a>

下表說明 Amazon DocumentDB 彈性叢集碎片中的最大 CPU、記憶體、連線和游標限制。


| 每個碎片vCPUs  | 執行個體記憶體 (GiB) | 連線限制 | 游標限制 | 
| --- | --- | --- | --- | 
| 2 | 16 | 1700 | 450 | 
| 4 | 32 | 3500 | 450 | 
| 8 | 64 | 7100 | 450 | 
| 16 | 128 | 14200 | 760 | 
| 32 | 256 | 28400 | 1520 | 
| 48 | 384 | 30000 | 2280 | 
| 64 | 512 | 30000 | 3040 | 