Skip to content

Commit 0bb7901

Browse files
committed
Edits and updates related to self-hosted gateway GA
1 parent 13e7903 commit 0bb7901

4 files changed

+52
-34
lines changed

articles/api-management/api-management-howto-cache-external.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,23 @@ editor: ''
99

1010
ms.assetid: 740f6a27-8323-474d-ade2-828ae0c75e7a
1111
ms.service: api-management
12-
ms.workload: mobile
13-
ms.tgt_pltfrm: na
1412
ms.topic: conceptual
15-
ms.date: 05/15/2019
13+
ms.date: 04/26/2020
1614
ms.author: apimpm
1715

1816
---
1917

20-
# Use an external Azure Cache for Redis in Azure API Management
18+
# Use an external Redis-compatible cache in Azure API Management
2119

22-
In addition to utilizing the built-in cache, Azure API Management also allows for caching responses in an external Azure Cache for Redis.
20+
In addition to utilizing the built-in cache, Azure API Management allows for caching responses in an external Redis-compatible cache, e.g. Azure Cache for Redis.
2321

24-
Using an external cache allows to overcome a few limitations of the built-in cache. It is especially beneficial if you would like to:
22+
Using an external cache allows to overcome a few limitations of the built-in cache:
2523

2624
* Avoid having your cache periodically cleared during API Management updates
2725
* Have more control over your cache configuration
2826
* Cache more data than your API Management tier allows to
2927
* Use caching with the Consumption tier of API Management
28+
* Enable caching in the [API Management self-hosted gateways](self-hosted-gateway-overview.md)
3029

3130
For more detailed information about caching, see [API Management caching policies](api-management-caching-policies.md) and [Custom caching in Azure API Management](api-management-sample-cache-by-key.md).
3231

@@ -50,14 +49,18 @@ This section explains how to create an Azure Cache for Redis in Azure. If you al
5049

5150
[!INCLUDE [redis-cache-create](../../includes/redis-cache-create.md)]
5251

52+
## <a name="create-cache"> </a> Deploy Redis cache to Kubernetes
53+
54+
For caching, self-hosted gateways rely exclusively on external caches. For caching to be effective self-hosted gateways and the cache they rely on must be located close to each other to minimize lookup and store latencies. Deploying a Redis cache into the same Kubernetes cluster or in a separate cluster nearby are the best options. Follow this [link](https://github.com/kubernetes/examples/tree/master/guestbook) to learn how to deploy Redis cache to a Kubernetes cluster.
55+
5356
## <a name="add-external-cache"> </a>Add an external cache
5457

5558
Follow the steps below to add an external Azure Cache for Redis in Azure API Management.
5659

5760
![Bring your own cache to APIM](media/api-management-howto-cache-external/add-external-cache.png)
5861

5962
> [!NOTE]
60-
> The **Use from** setting specifies which API Management regional deployment will communicate with the configured cache in case of a multi-regional configuration of API Management. The caches specified as **Default** will be overridden by caches with a regional value.
63+
> The **Use from** setting specifies an Azure region or a self-hosted gateway location that will use the configured cache. The caches configured as **Default** will be overridden by caches with a specific matching region or location value.
6164
>
6265
> For example, if API Management is hosted in the East US, Southeast Asia and West Europe regions and there are two caches configured, one for **Default** and one for **Southeast Asia**, API Management in **Southeast Asia** will use its own cache, while the other two regions will use the **Default** cache entry.
6366
@@ -80,6 +83,16 @@ Follow the steps below to add an external Azure Cache for Redis in Azure API Man
8083
6. Provide your Azure Cache for Redis connection string in the **Connection string** field.
8184
7. Click **Save**.
8285

86+
### Add a Redis cache to a self-hosted gateway
87+
88+
1. Browse to your API Management instance in the Azure portal.
89+
2. Select the **External cache** tab from the menu on the left.
90+
3. Click the **+ Add** button.
91+
4. Select **Custom** in the **Cache instance** dropdown field.
92+
5. Specify the desired self-hosted gateway location or **Default** in the **Use from** dropdown field.
93+
6. Provide your Redis cache connection string in the **Connection string** field.
94+
7. Click **Save**.
95+
8396
## Use the external cache
8497

8598
Once the external cache is configured in Azure API Management, it can be used through caching policies. See [Add caching to improve performance in Azure API Management](api-management-howto-cache.md) for detailed steps.

articles/api-management/api-management-howto-deploy-self-hosted-gateway-to-docker.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ manager: gwallace
88
editor: ''
99

1010
ms.service: api-management
11-
ms.workload: mobile
12-
ms.tgt_pltfrm: na
1311
ms.topic: article
14-
ms.date: 03/31/2020
12+
ms.date: 04/26/2020
1513
ms.author: apimpm
1614

1715
---
@@ -20,6 +18,9 @@ ms.author: apimpm
2018

2119
This article provides the steps for deploying self-hosted Azure API Management gateway into a Docker environment.
2220

21+
> [!NOTE]
22+
> Hosting self-hosted gateway in Docker is best suited for evaluation and development use cases. Kubernetes is recommended for production use. See [this](api-management-howto-deploy-self-hosted-gateway-to-k8s.md) document to learn how to deploy self-hosted gateway to Kubernetes.
23+
2324
## Prerequisites
2425

2526
- Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md)
@@ -31,25 +32,25 @@ This article provides the steps for deploying self-hosted Azure API Management g
3132
3233
## Deploy the self-hosted gateway to Docker
3334

34-
1. Select **Gateways** from under **Settings**.
35+
1. Select **Gateways** from under **Deployment and infrastructure**.
3536
2. Select the gateway resource you intend to deploy.
3637
3. Select **Deployment**.
37-
4. Note that a new token in the **Token** text box was autogenerated for you using the default **Expiry** and **Secret Key** values. Adjust either or both if desired and select **Generate** to create a new token.
38+
4. Note that an access token in the **Token** text box was autogenerated for you using the default **Expiry** and **Secret key** values. If needed, pick desired values in either or both controls to generate a new token.
3839
4. Make sure **Docker** is selected under **Deployment scripts**.
3940
5. Select **env.conf** file link next to the **Environment** to download the file.
40-
6. Select **copy** icon located at the right end of the **Run** text box to save the Docker command to clipboard.
41-
7. Paste the command to the terminal (or command) window. Adjust the port mappings and container name as needed. Note that the command expects the downloaded environment file to be present in the current directory.
41+
6. Select **copy** icon located at the right end of the **Run** text box to copy the Docker command to clipboard.
42+
7. Paste the command to the terminal (or command) window. Adjust the port mappings and container name as needed. Note that the command assumes that downloaded environment file is present in the current directory.
4243
```
4344
docker run -d -p 80:8080 -p 443:8081 --name <gateway-name> --env-file env.conf mcr.microsoft.com/azure-api-management/gateway:<tag>
4445
```
45-
8. Execute the command. The command instructs your Docker environment to run the container, using self-hosted gateway's image downloaded from the Microsoft Container Registry, and to map the container's HTTP (8080) and HTTPS (8081) ports to ports 80 and 443 on the host.
46-
9. Run the below command to check the gateway pod is running:
46+
8. Execute the command. The command instructs your Docker environment to run the container using [container image](https://aka.ms/apim/sputnik/dhub) downloaded from the Microsoft Container Registry, and to map the container's HTTP (8080) and HTTPS (8081) ports to ports 80 and 443 on the host.
47+
9. Run the below command to check if the gateway container is running:
4748
```console
4849
docker ps
4950
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
50-
895ef0ecf13b mcr.microsoft.com/azure-api-management/gateway:beta "/bin/sh -c 'dotnet …" 5 seconds ago Up 3 seconds 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8081/tcp my-gateway
51+
895ef0ecf13b mcr.microsoft.com/azure-api-management/gateway:latest "/bin/sh -c 'dotnet …" 5 seconds ago Up 3 seconds 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8081/tcp my-gateway
5152
```
52-
10. Go back to Azure portal and confirm that gateway node you just deployed is reporting healthy status.
53+
10. Go back to Azure portal, click on **Overview** and confirm that self-hosted gateway container you just deployed is reporting a healthy status.
5354

5455
![gateway status](media/api-management-howto-deploy-self-hosted-gateway-to-docker/status.png)
5556

articles/api-management/api-management-howto-deploy-self-hosted-gateway-to-k8s.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This article describes the steps for deploying self-hosted gateway to a Kubernet
3232
6. Click on the **<gateway-name>.yml** file link and download the YAML file.
3333
7. Select **copy** icon located at the bottom right corner of the **Deploy** text box to save the `kubectl` commands to the clipboard.
3434
8. Paste commands to the terminal (or command) window. The first command creates a Kubernetes secret containing access token generated in step 4. Second command applies the configuration file downloaded in step 6 to the Kubernetes cluster and expects the the file to be present in the current directory.
35-
9. Execute the commands to create the necessary Kubernetes objects in the [default namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) and start self-hosted gateway pod(s) from [container image](https://aka.ms/apim/sputnik/repo) downloaded from the Microsoft Container Registry.
35+
9. Execute the commands to create the necessary Kubernetes objects in the [default namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) and start self-hosted gateway pod(s) from [container image](https://aka.ms/apim/sputnik/dhub) downloaded from the Microsoft Container Registry.
3636
10. Execute command shown bellow to check if the deployment succeeded . Note that it might take a little time for all the objects to be created and for pod(s) to initialize.
3737
```console
3838
kubectl get deployments

articles/api-management/self-hosted-gateway-overview.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
---
22
title: Azure API Management self-hosted gateway overview | Microsoft Docs
3-
description: Learn how Azure API Management self-hosted gateway helps organizations manage APIs in the hybrid and multicloud environments.
3+
description: Learn how Azure API Management self-hosted gateway helps organizations manage APIs in hybrid and multicloud environments.
44
services: api-management
55
documentationcenter: ''
66
author: vlvinogr
77
manager: gwallace
88
editor: ''
99

1010
ms.service: api-management
11-
ms.workload: mobile
12-
ms.tgt_pltfrm: na
1311
ms.topic: article
14-
ms.date: 04/24/2020
12+
ms.date: 04/26/2020
1513
ms.author: apimpm
1614
---
1715

18-
# Self-hosted API Management gateway overview
16+
# API Management self-hosted gateway overview
1917

20-
This article explains how self-hosted gateway feature enables hybrid and multi-cloud API management, presents its high-level architecture, and highlights its fundamental capabilities.
18+
This article explains how self-hosted gateway feature enables hybrid and multi-cloud API management, presents its high-level architecture, and highlights its capabilities.
2119

2220
## Hybrid and multi-cloud API management
2321

@@ -35,20 +33,26 @@ By default, all these components are deployed in Azure, causing all API traffic
3533

3634
![API traffic flow without self-hosted gateways](media/self-hosted-gateway-overview/without-gateways.png)
3735

38-
Deploying self-hosted gateways into the same environments as backend API implementations and adding them to the API Management service allows API traffic to flow directly to the backend APIs, which improves latency, optimizes data transfer costs, and enables compliance while retaining the benefits of having a single point of management and discovery of all APIs within the organization regardless of where their implementations are hosted.
36+
Deploying self-hosted gateways into the same environments where the backend API implementations are hosted allows API traffic to flow directly to the backend APIs, which improves latency, optimizes data transfer costs, and enables compliance while retaining the benefits of having a single point of management, observanility, and discovery of all APIs within the organization regardless of where their implementations are hosted.
3937

4038
![API traffic flow with self-hosted gateways](media/self-hosted-gateway-overview/with-gateways.png)
4139

4240
## Packaging and features
4341

44-
The self-hosted gateway is a containerized, functionally-equivalent version of the managed gateway deployed to Azure as part of every API Management service. The self-hosted gateway is available as a Linux-based Docker container from the Microsoft Container Registry. It can be deployed to Docker, Kubernetes, or any other container orchestration solution running on a desktop, server cluster, or cloud infrastructure.
42+
The self-hosted gateway is a containerized, functionally-equivalent version of the managed gateway deployed to Azure as part of every API Management service. The self-hosted gateway is available as a Linux-based Docker [container](https://aka.ms/apim/sputnik/dhub) from the Microsoft Container Registry. It can be deployed to Docker, Kubernetes, or any other container orchestration solution running on a server cluster on premises, cloud infrastructure, or for evaluation and development purposes, on a personal computer.
4543

46-
> [!IMPORTANT]
47-
> Some functionality available in the managed gateway is not yet available in preview. Most notably: Log to Event Hub policy, Service Fabric integration, downstream HTTP/2. There is no plan to make a built-in cache available in the self-hosted gateway.
44+
The following functionality found in the managed gateways is **not available** in the self-hosted gateways:
45+
46+
- Upstream (backend side) TLS version and cipher management
47+
- Validation of server and client certificates using CA root certificates uploaded to API Management service. To add support for custom CA, add a layer to the self-hosted gateway container image that installs the CA's root certificate.
48+
- Integration with the [Service Fabric](../service-fabric/service-fabric-api-management-overview.md)
49+
- TLS session resumption
50+
- Client certificate renegotiation. Therefore, when using client certificate authentication, clients must be required to present their certificates as part of the TLS handshake. To accomplish that, enable the negotiate client certificate setting when configuring a self-hosted gateway custom hostname.
51+
- Built-in cache. See this [document](api-management-howto-cache-external.md) to learn about using external cache in self-hosted gateways.
4852

4953
## Connectivity to Azure
5054

51-
The self-hosted gateway requires outbound TCP/IP connectivity to Azure on port 443. Each self-hosted gateway has to be associated with a single API Management service and is configured via its management plane. Self-hosted gateway uses connectivity to Azure for:
55+
Self-hosted gateways require outbound TCP/IP connectivity to Azure on port 443. Each self-hosted gateway must be associated with a single API Management service and is configured via its management plane. Self-hosted gateway uses connectivity to Azure for:
5256

5357
- Reporting its status by sending heartbeat messages every minute
5458
- Regularly checking for (every 10 seconds) and applying configuration updates whenever they are available
@@ -57,17 +61,17 @@ The self-hosted gateway requires outbound TCP/IP connectivity to Azure on port 4
5761

5862
When connectivity to Azure is lost, self-hosted gateway will be unable to receive configuration updates, report its status, or upload telemetry.
5963

60-
The self-hosted gateway is designed to "fail static" and can survive the temporary loss of connectivity to Azure. It can be deployed with or without local configuration backup turned on. In the former case, self-hosted gateways will regularly save a backup copy of configuration on a persistent volume attached to the container or pod.
64+
The self-hosted gateway is designed to "fail static" and can survive temporary loss of connectivity to Azure. It can be deployed with or without local configuration backup. In the former case, self-hosted gateways will regularly save a backup copy of the latest downloaded configuration on a persistent volume attached to its container or pod.
6165

6266
When configuration backup is turned off and connectivity to Azure is interrupted:
6367

64-
- Self-hosted gateways that are running will continue to function using an in-memory copy of the configuration
68+
- Running self-hosted gateways will continue to function using an in-memory copy of the configuration
6569
- Stopped self-hosted gateways will not be able to start
6670

6771
When configuration backup is turned on and connectivity to Azure is interrupted:
6872

69-
- Self-hosted gateways that are running will continue to function using an in-memory copy of the configuration
70-
- Stopped self-hosted gateways will start using a backup copy of the configuration
73+
- Running self-hosted gateways will continue to function using an in-memory copy of the configuration
74+
- Stopped self-hosted gateways will be able to start using a backup copy of the configuration
7175

7276
When connectivity is restored, each self-hosted gateway affected by the outage will automatically reconnect with its associated API Management service and download all configuration updates that occurred while the gateway was "offline".
7377

0 commit comments

Comments
 (0)