Azure API Management self-hosted gateway availabity and automation

Mehdi 20 Reputation points
2023-09-19T16:16:00.1833333+00:00

Hello, I have several questions regarding the self-hosted gateway in Azure APIM :

  • Is there any way to automate the updates of the Docker images hosted on https://mcr.microsoft.com/product/azure-api-management/gateway/tags by transferring them directly to an Azure Container Registry ?
  • We need to ensure high availability for our self-hosted gateway, ideally following an active/passive strategy. I assume one option is to duplicate the virtual machine, but would this involve creating two separate gateways, or can we have multiple instances of the same self-hosted gateway? In either case, what impact would this have on the costs of the self-hosted gateway ?
  • Is it possible to configure an alerting policy in Azure to notify us if the self-hosted gateway experiences downtime or if the last synchronization with the APIM fails ?
  • How can I enable configuration backup when deploying the self-hosted gateway on Docker? I couldn't find the appropriate setting in the reference page: https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/api-management/self-hosted-gateway-settings-reference.md

Thank you for your answer.

Best regards.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,763 questions
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 21,246 Reputation points
    2023-09-22T18:10:20.97+00:00

    Hi Mehdi Thanks for reaching out. Please find the details below

    • Is there any way to automate the updates of the Docker images hosted on https://mcr.microsoft.com/product/azure-api-management/gateway/tags by transferring them directly to an Azure Container Registry ?
      You can use tools like Dependabot or Renovate to automatically update tags.
    • We need to ensure high availability for our self-hosted gateway, ideally following an active/passive strategy. I assume one option is to duplicate the virtual machine, but would this involve creating two separate gateways, or can we have multiple instances of the same self-hosted gateway? In either case, what impact would this have on the costs of the self-hosted gateway ?
      you can have multiple instances of the same self-hosted gateway by installing the self-hosted gateway on multiple virtual machines and configuring them to work together as a cluster. This way, if one instance of the gateway fails, the other instances can take over and ensure that the gateway remains available.
      or
      For high availability, you can deploy the self-hosted gateway on a Kubernetes cluster that uses availability zones. This allows you to schedule the self-hosted gateway’s pod on nodes spread across the zones. As for costs, the self-hosted gateway feature is available in the Premium and Developer tiers of API Management. There is an additional cost for the self-hosted gateway, calculated as a unit price per hour per gateway deployment. https://azure.microsoft.com/en-in/pricing/calculator/ https://learn.microsoft.com/en-us/azure/api-management/how-to-self-hosted-gateway-on-kubernetes-in-production
    • Is it possible to configure an alerting policy in Azure to notify us if the self-hosted gateway experiences downtime or if the last synchronization with the APIM fails ? self-hosted gateway experiences downtime is a typical container monitoring, and this is not related to Self hosted Gateway and regarding Last synchronized we don't have any option as of today please feel free to leave your feedback at aka.ms/apimwish but you can check here:
      User's image
    • How can I enable configuration backup when deploying the self-hosted gateway on Docker? I couldn't find the appropriate setting in the reference page: https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/api-management/self-hosted-gateway-settings-reference.md When deploying the self-hosted gateway on Docker, you should configure a local storage volume for the self-hosted gateway container so it can persist a backup copy of the latest downloaded configuration. If connectivity is down, the storage volume can use the backup copy upon restart. The volume mount path must be /apim/config and must be owned by group ID 1001.
      reference: https://learn.microsoft.com/en-us/azure/api-management/how-to-self-hosted-gateway-on-kubernetes-in-production#configuration-backup

    let me know incase of further queries, I would be happy to assist you.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful