Skip to content

Commit f71c689

Browse files
authored
Merge pull request #205925 from jcocchi/cosmosdb-dedicated-gateway
Cosmos DB dedicated gateway GA updates
2 parents 7984741 + 96769c8 commit f71c689

13 files changed

+135
-127
lines changed

articles/cosmos-db/dedicated-gateway.md

Lines changed: 19 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ author: seesharprun
55
ms.service: cosmos-db
66
ms.subservice: cosmosdb-sql
77
ms.topic: conceptual
8-
ms.date: 11/08/2021
8+
ms.date: 08/29/2022
99
ms.author: sidandrews
1010
ms.reviewer: jucocchi
1111
---
1212

13-
# Azure Cosmos DB dedicated gateway - Overview (Preview)
13+
# Azure Cosmos DB dedicated gateway - Overview
1414
[!INCLUDE[appliesto-sql-api](includes/appliesto-sql-api.md)]
1515

1616
A dedicated gateway is server-side compute that is a front-end to your Azure Cosmos DB account. When you connect to the dedicated gateway, it both routes requests and caches data. Like provisioned throughput, the dedicated gateway is billed hourly.
1717

1818
## Overview
1919

20-
You can provision a dedicated gateway to improve performance at scale. The most common reason that you would want to provision a dedicated gateway would be for caching. When you provision a dedicated gateway, an [integrated cache](integrated-cache.md) is automatically configured within the dedicated gateway. Point reads and queries that hit the integrated cache do not use any of your RUs. Provisioning a dedicated gateway with an integrated cache can help read-heavy workloads lower costs on Azure Cosmos DB.
20+
You can provision a dedicated gateway to improve performance at scale. The most common reason that you would want to provision a dedicated gateway is for caching. When you provision a dedicated gateway, an [integrated cache](integrated-cache.md) is automatically configured within the dedicated gateway. Point reads and queries that hit the integrated cache do not use any of your RUs. Provisioning a dedicated gateway with an integrated cache can help read-heavy workloads lower costs on Azure Cosmos DB.
2121

22-
The dedicated gateway is built into Azure Cosmos DB. When you [provision a dedicated gateway](how-to-configure-integrated-cache.md), you have a fully-managed node that routes requests to backend partitions. Connecting to Azure Cosmos DB with the dedicated gateway provides lower and more predictable latency than connecting to Azure Cosmos DB with the standard gateway. Even cache misses will see latency improvements when comparing the dedicated gateway and standard gateway.
22+
The dedicated gateway is built into Azure Cosmos DB. When you [provision a dedicated gateway](how-to-configure-integrated-cache.md), you have a fully managed node that routes requests to backend partitions. Connecting to Azure Cosmos DB with the dedicated gateway provides lower and more predictable latency than connecting to Azure Cosmos DB with the standard gateway. Even cache misses will see latency improvements when comparing the dedicated gateway and standard gateway.
2323

2424
There are only minimal code changes required in order for your application to use a dedicated gateway. Both new and existing Azure Cosmos DB accounts can provision a dedicated gateway for improved read performance.
2525

@@ -29,48 +29,38 @@ [email protected]
2929

3030
## Connection modes
3131

32-
There are three ways to connect to an Azure Cosmos DB account:
32+
There are two [connectivity modes](./sql/sql-sdk-connection-modes.md) for Azure Cosmos DB, Direct mode and Gateway mode. With Gateway mode you can connect to either the standard gateway or the dedicated gateway depending on the endpoint you configure.
3333

34-
- [Direct mode](#connect-to-azure-cosmos-db-using-direct-mode)
35-
- [Gateway mode using the standard gateway](#connect-to-azure-cosmos-db-using-gateway-mode)
36-
- [Gateway mode using the dedicated gateway](#connect-to-azure-cosmos-db-using-the-dedicated-gateway) (only available for SQL API accounts)
34+
:::image type="content" source="./media/dedicated-gateway/connection-policy.png" alt-text="Diagram that shows how Cosmos DB connectivity modes work." :::
3735

3836
### Connect to Azure Cosmos DB using direct mode
3937

40-
When you connect to Azure Cosmos DB using direct mode, your application connects directly to the Azure Cosmos DB backend. Even if you have many physical partitions, request routing is handled entirely client-side. Direct mode offers low latency because your application can communicate directly with the Azure Cosmos DB backend and doesn't need an intermediate network hop.
41-
42-
Graphical representation of direct mode connection:
43-
44-
:::image type="content" source="./media/dedicated-gateway/direct-mode.png" alt-text="An image that shows how Cosmos DB direct mode works" border="false":::
38+
When you connect to Azure Cosmos DB using direct mode, your application connects directly to the Azure Cosmos DB backend. Even if you have many physical partitions, request routing is handled entirely client-side. Direct mode offers low latency because your application can communicate directly with the Azure Cosmos DB backend and doesn't need an intermediate network hop. If you choose to connect with direct mode your requests will not use the dedicated gateway or the integrated cache.
4539

4640
### Connect to Azure Cosmos DB using gateway mode
4741

4842
If you connect to Azure Cosmos DB using gateway mode, your application will connect to a front-end node first, which handles routing the request to the appropriate backend nodes. Because gateway mode involves an additional network hop, you may observe slightly higher latency when compared to direct mode.
4943

5044
When connecting to Azure Cosmos DB with gateway mode, you can connect with either of the following options:
5145

52-
* **Standard gateway** - While the backend, which includes your provisioned throughput and storage, has dedicated capacity per container, the standard gateway is shared between many Azure Cosmos accounts. It is practical for many customers to share a standard gateway since the compute resources consumed by each individual customer is small.
46+
* **Standard gateway** - While the backend, which includes your provisioned throughput and storage, has dedicated capacity per container, the standard gateway is shared between many Azure Cosmos DB accounts. It is practical for many customers to share a standard gateway since the compute resources consumed by each individual customer are small.
5347
* **Dedicated gateway** - In this gateway, the backend and gateway both have dedicated capacity. The integrated cache requires a dedicated gateway because it requires significant CPU and memory that is specific to your Azure Cosmos account.
5448

55-
### Connect to Azure Cosmos DB using the dedicated gateway
56-
57-
You must connect to Azure Cosmos DB using the dedicated gateway in order to use the integrated cache. The dedicated gateway has a different endpoint from the standard one provided with your Azure Cosmos DB account. When you connect to your dedicated gateway endpoint, your application sends a request to the dedicated gateway, which then routes the request to different backend nodes. If possible, the integrated cache will serve the result.
49+
You must connect to Azure Cosmos DB using the dedicated gateway in order to use the integrated cache. The dedicated gateway has a different endpoint from the standard one provided with your Azure Cosmos DB account, but requests are routed in the same way. When you connect to your dedicated gateway endpoint, your application sends a request to the dedicated gateway, which then routes the request to different backend nodes. If possible, the integrated cache will serve the result.
5850

5951
Diagram of gateway mode connection with a dedicated gateway:
6052

61-
:::image type="content" source="./media/dedicated-gateway/dedicated-gateway-mode.png" alt-text="An image that shows how the Cosmos DB dedicated gateway works" border="false":::
53+
:::image type="content" source="./media/dedicated-gateway/dedicated-gateway-connection-policy.png" alt-text="Diagram that shows how the Cosmos DB dedicated gateway works." :::
6254

6355
## Provisioning the dedicated gateway
6456

65-
A dedicated gateway cluster can be provisioned in Core (SQL) API accounts. A dedicated gateway cluster can have up to five nodes and you can add or remove nodes at any time. All dedicated gateway nodes within your account [share the same connection string](how-to-configure-integrated-cache.md#configuring-the-integrated-cache).
57+
A dedicated gateway cluster can be provisioned in Core (SQL) API accounts. A dedicated gateway cluster can have up to five nodes by default and you can add or remove nodes at any time. All dedicated gateway nodes within your account [share the same connection string](how-to-configure-integrated-cache.md#configuring-the-integrated-cache).
6658

67-
Dedicated gateway nodes are independent from one another. When you provision multiple dedicated gateway nodes, any single node can route any given request. In addition, each node has a separate integrated cache from the others. The cached data within each node depends on the data that was recently [written or read](integrated-cache.md#item-cache) through that specific node. In other words, if an item or query is cached on one node, it isn't necessarily cached on the others.
59+
Dedicated gateway nodes are independent from one another. When you provision multiple dedicated gateway nodes, any single node can route any given request. In addition, each node has a separate integrated cache from the others. The cached data within each node depends on the data that was recently [written or read](integrated-cache.md#item-cache) through that specific node. If an item or query is cached on one node, it isn't necessarily cached on the others.
6860

6961
For development, we recommend starting with one node but for production, you should provision three or more nodes for high availability. [Learn how to provision a dedicated gateway cluster with an integrated cache](how-to-configure-integrated-cache.md). Provisioning multiple dedicated gateway nodes allows the dedicated gateway cluster to continue to route requests and serve cached data, even when one of the dedicated gateway nodes is unavailable.
7062

71-
Because it is in public preview, the dedicated gateway does not have an availability SLA. However, you should generally expect comparable availability to the rest of your Azure Cosmos DB account.
72-
73-
The dedicated gateway is available in the following sizes:
63+
The dedicated gateway is available in the following sizes. The integrated cache uses approximately 50% of the memory and the rest is reserved for metadata and routing requests to backend partitions.
7464

7565
| **Sku Name** | **vCPU** | **Memory** |
7666
| ------------ | -------- | ----------- |
@@ -79,12 +69,12 @@ The dedicated gateway is available in the following sizes:
7969
| **D16s** | **16** | **64 GB** |
8070

8171
> [!NOTE]
82-
> Once created, you can't modify the size of the dedicated gateway nodes. However, you can add or remove nodes.
72+
> Once created, you can add or remove dedicated gateway nodes, but you can't modify the size of the nodes. To change the size of your dedicated gateway nodes you can deprovision the cluster and provision it again in a different size. This will result in a short period of downtime unless you change the connection string in your application to use the standard gateway during reprovisioning.
8373
8474
There are many different ways to provision a dedicated gateway:
8575

86-
- [Provision a dedicated gateway using the Azure Portal](how-to-configure-integrated-cache.md#provision-a-dedicated-gateway-cluster)
87-
- [Use Azure Cosmos DB's REAT API](/rest/api/cosmos-db-resource-provider/2021-04-01-preview/service/create)
76+
- [Provision a dedicated gateway using the Azure Portal](how-to-configure-integrated-cache.md#provision-the-dedicated-gateway)
77+
- [Use Azure Cosmos DB's REST API](/rest/api/cosmos-db-resource-provider/2021-04-01-preview/service/create)
8878
- [Azure CLI](/cli/azure/cosmosdb/service?view=azure-cli-latest&preserve-view=true#az-cosmosdb-service-create)
8979
- [ARM template](/azure/templates/microsoft.documentdb/databaseaccounts/services?tabs=bicep)
9080
- Note: You cannot deprovision a dedicated gateway using ARM templates
@@ -93,43 +83,16 @@ There are many different ways to provision a dedicated gateway:
9383

9484
When you provision a dedicated gateway cluster in multi-region accounts, identical dedicated gateway clusters are provisioned in each region. For example, consider an Azure Cosmos DB account in East US and North Europe. If you provision a dedicated gateway cluster with two D8 nodes in this account, you'd have four D8 nodes in total - two in East US and two in North Europe. You don't need to explicitly configure dedicated gateways in each region and your connection string remains the same. There are also no changes to best practices for performing failovers.
9585

96-
> [!NOTE]
97-
> You cannot provision a dedicated gateway cluster in accounts with availability zones enabled
98-
9986
Like nodes within a cluster, dedicated gateway nodes across regions are independent. It's possible that the cached data in each region will be different, depending on the recent reads or writes to that region.
10087

10188
## Limitations
10289

103-
The dedicated gateway has the following limitations during the public preview:
90+
The dedicated gateway has the following limitations:
10491

105-
- Dedicated gateways are only supported on SQL API accounts.
106-
- You can't provision a dedicated gateway in Azure Cosmos DB accounts with [IP firewalls](how-to-configure-firewall.md) or [Private Link](how-to-configure-private-endpoints.md) configured.
107-
- You can't provision a dedicated gateway in an Azure Cosmos DB account in a [Virtual Network (Vnet)](how-to-configure-vnet-service-endpoint.md)
92+
- Dedicated gateways are only supported on SQL API accounts
10893
- You can't provision a dedicated gateway in Azure Cosmos DB accounts with [availability zones](../availability-zones/az-region.md).
10994
- You can't use [role-based access control (RBAC)](how-to-setup-rbac.md) to authenticate data plane requests routed through the dedicated gateway
11095

111-
The dedicated gateway blade is hidden on Azure Cosmos DB accounts with IP firewalls, Vnet, Private Link, or availability zones.
112-
113-
## Supported regions
114-
115-
The dedicated gateway is in public preview and isn't supported in every Azure region yet. Throughout the public preview, we'll be adding new capacity. We won't have region restrictions when the dedicated gateway is generally available.
116-
117-
Current list of supported Azure regions:
118-
119-
| **Americas** | **Europe and Africa** | **Asia Pacific** |
120-
| ------------ | -------- | ----------- |
121-
| Brazil South | France Central | Australia Central |
122-
| Canada Central | France South | Australia Central 2 |
123-
| Canada East | Germany North | Australia Southeast |
124-
| Central US | Germany West Central | Central India |
125-
| East US | North Europe | East Asia |
126-
| East US 2 | Switzerland North | Japan West |
127-
| North Central US | UK South | Korea Central |
128-
| South Central US | UK West | Korea South |
129-
| West Central US | West Europe | Southeast Asia |
130-
| West US | | UAE Central |
131-
| West US 2 | | West India |
132-
13396

13497
## Next steps
13598

@@ -139,5 +102,5 @@ Read more about dedicated gateway usage in the following articles:
139102
- [Configure the integrated cache](how-to-configure-integrated-cache.md)
140103
- [Integrated cache FAQ](integrated-cache-faq.md)
141104
- Trying to do capacity planning for a migration to Azure Cosmos DB? You can use information about your existing database cluster for capacity planning.
142-
- If all you know is the number of vcores and servers in your existing database cluster, read about [estimating request units using vCores or vCPUs](convert-vcore-to-request-unit.md)
105+
- If all you know is the number of vCores and servers in your existing database cluster, read about [estimating request units using vCores or vCPUs](convert-vcore-to-request-unit.md)
143106
- If you know typical request rates for your current database workload, read about [estimating request units using Azure Cosmos DB capacity planner](estimate-ru-with-capacity-planner.md)

0 commit comments

Comments
 (0)