In a recent blog post, Microsoft announced a public preview for Azure Functions Proxies. This feature provides reverse proxy functionality targeted at organizations that expose many Azure Function Apps and want to have a common public endpoint, regardless of where and how many Function Apps have been provisioned.
Mathew Henderson, a program manager at Microsoft, describes some of the challenges that Azure Functions Proxies solve:
Since we first released Azure Functions, we’ve seen a lot of customers using the service to build APIs. Functions are a fantastic way to quickly express an action, and the consumption plan is a great billing model for many types of applications. However, we’ve also heard that dealing with multiple functions could be easier. It’s often difficult to manage large solutions within a single function app. There are also quite a few customers that want to use microservices architectures, with deployment isolation between individual components. Splitting the work into multiple function apps works for most triggers, but it’s a bit trickier for APIs.
Azure Functions Proxies address challenges that exist for developers who have a lot of APIs, or microservices. In part due to each Azure Function App having its own hostname, Azure Functions may be hosted in multiple regions. Passing this URL management complexity down to API consumers creates friction. Developers will now have the ability to expose a reverse proxy endpoint and abstract underlying APIs which can include other Function Apps, APIs, Azure API Apps or other HTTP endpoints.
A developer can create an Azure Function Proxy within the same UI as a Function App. Within the configuration, a developer will be asked to provide a Route template, identify which HTTP methods are allowed and provide a Backend URL where the HTTP request will be routed to. Backend URLs do not need to be static as you can dynamically set the URL based on content within the request or from your application settings.
Image Source: https://blogs.msdn.microsoft.com/appserviceteam/2017/02/22/azure-functions-proxies-public-preview/
For developers who provision their Function Apps using continuous deployment, including BitBucket, Dropbox, GitHub or Visual Studio Team Services, they can also deploy their Azure Functions Proxies in the same manner, provided Azure Functions Proxies has been enabled. All Azure Function Proxy information is stored in a file called proxies.json file which can be found at the root of the function app directory.
Azure Functions Proxies are currently free while the feature is in preview. Standard billing applies to proxy executions. Please see the Azure Functions pricing page for more details.