You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/api-management-howto-cache-external.md
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,24 +9,23 @@ editor: ''
9
9
10
10
ms.assetid: 740f6a27-8323-474d-ade2-828ae0c75e7a
11
11
ms.service: api-management
12
-
ms.workload: mobile
13
-
ms.tgt_pltfrm: na
14
12
ms.topic: conceptual
15
-
ms.date: 05/15/2019
13
+
ms.date: 04/26/2020
16
14
ms.author: apimpm
17
15
18
16
---
19
17
20
-
# Use an external Azure Cache for Redis in Azure API Management
18
+
# Use an external Redis-compatible cache in Azure API Management
21
19
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.
23
21
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:
25
23
26
24
* Avoid having your cache periodically cleared during API Management updates
27
25
* Have more control over your cache configuration
28
26
* Cache more data than your API Management tier allows to
29
27
* Use caching with the Consumption tier of API Management
28
+
* Enable caching in the [API Management self-hosted gateways](self-hosted-gateway-overview.md)
30
29
31
30
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).
32
31
@@ -50,14 +49,18 @@ This section explains how to create an Azure Cache for Redis in Azure. If you al
## <aname="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
+
53
56
## <aname="add-external-cache"> </a>Add an external cache
54
57
55
58
Follow the steps below to add an external Azure Cache for Redis in Azure API Management.
56
59
57
60

58
61
59
62
> [!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.
61
64
>
62
65
> 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.
63
66
@@ -80,6 +83,16 @@ Follow the steps below to add an external Azure Cache for Redis in Azure API Man
80
83
6. Provide your Azure Cache for Redis connection string in the **Connection string** field.
81
84
7. Click **Save**.
82
85
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
+
83
96
## Use the external cache
84
97
85
98
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.
Copy file name to clipboardExpand all lines: articles/api-management/api-management-howto-deploy-self-hosted-gateway-to-docker.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,8 @@ manager: gwallace
8
8
editor: ''
9
9
10
10
ms.service: api-management
11
-
ms.workload: mobile
12
-
ms.tgt_pltfrm: na
13
11
ms.topic: article
14
-
ms.date: 03/31/2020
12
+
ms.date: 04/26/2020
15
13
ms.author: apimpm
16
14
17
15
---
@@ -20,6 +18,9 @@ ms.author: apimpm
20
18
21
19
This article provides the steps for deploying self-hosted Azure API Management gateway into a Docker environment.
22
20
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
+
23
24
## Prerequisites
24
25
25
26
- 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
31
32
32
33
## Deploy the self-hosted gateway to Docker
33
34
34
-
1. Select **Gateways** from under **Settings**.
35
+
1. Select **Gateways** from under **Deployment and infrastructure**.
35
36
2. Select the gateway resource you intend to deploy.
36
37
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.
38
39
4. Make sure **Docker** is selected under **Deployment scripts**.
39
40
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.
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:
47
48
```console
48
49
docker ps
49
50
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
51
52
```
52
-
10. Go back to Azure portaland 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.
Copy file name to clipboardExpand all lines: articles/api-management/api-management-howto-deploy-self-hosted-gateway-to-k8s.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ This article describes the steps for deploying self-hosted gateway to a Kubernet
32
32
6. Click on the **<gateway-name>.yml** file link and download the YAML file.
33
33
7. Select **copy** icon located at the bottom right corner of the **Deploy** text box to save the `kubectl` commands to the clipboard.
34
34
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.
36
36
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.
Copy file name to clipboardExpand all lines: articles/api-management/self-hosted-gateway-overview.md
+19-15Lines changed: 19 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,21 @@
1
1
---
2
2
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.
4
4
services: api-management
5
5
documentationcenter: ''
6
6
author: vlvinogr
7
7
manager: gwallace
8
8
editor: ''
9
9
10
10
ms.service: api-management
11
-
ms.workload: mobile
12
-
ms.tgt_pltfrm: na
13
11
ms.topic: article
14
-
ms.date: 04/24/2020
12
+
ms.date: 04/26/2020
15
13
ms.author: apimpm
16
14
---
17
15
18
-
# Self-hosted API Management gateway overview
16
+
# API Management self-hosted gateway overview
19
17
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.
21
19
22
20
## Hybrid and multi-cloud API management
23
21
@@ -35,20 +33,26 @@ By default, all these components are deployed in Azure, causing all API traffic
35
33
36
34

37
35
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.
39
37
40
38

41
39
42
40
## Packaging and features
43
41
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.
45
43
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.
48
52
49
53
## Connectivity to Azure
50
54
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:
52
56
53
57
- Reporting its status by sending heartbeat messages every minute
54
58
- 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
57
61
58
62
When connectivity to Azure is lost, self-hosted gateway will be unable to receive configuration updates, report its status, or upload telemetry.
59
63
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.
61
65
62
66
When configuration backup is turned off and connectivity to Azure is interrupted:
63
67
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
65
69
- Stopped self-hosted gateways will not be able to start
66
70
67
71
When configuration backup is turned on and connectivity to Azure is interrupted:
68
72
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
71
75
72
76
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".
0 commit comments