Skip to content

Commit 4d03a5a

Browse files
Merge pull request #268729 from thomasgauvin/patch-32
distributed functions
2 parents 46c1f77 + ba85af4 commit 4d03a5a

File tree

3 files changed

+56
-5
lines changed

3 files changed

+56
-5
lines changed

articles/static-web-apps/TOC.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,14 @@
9393
items:
9494
- name: Integration options
9595
href: apis-functions.md
96-
- name: Add an API
97-
href: add-api.md
98-
- name: Bring your own functions
99-
href: functions-bring-your-own.md
96+
- name: Distributed functions
97+
href: distributed-functions.md
98+
- name: Tutorials
99+
items:
100+
- name: Add an API
101+
href: add-api.md
102+
- name: Bring your own functions
103+
href: functions-bring-your-own.md
100104
- name: Azure API Management
101105
href: apis-api-management.md
102106
- name: Azure App Service

articles/static-web-apps/apis-functions.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ The following table contrasts the differences between using managed and existing
2828
| Supported Azure Functions [hosting plans](../azure-functions/functions-scale.md) | Consumption | Consumption<br>Premium<br>Dedicated |
2929
| [Integrated security](user-information.md) with direct access to user authentication and role-based authorization data |||
3030
| [Routing integration](./configuration.md?#routes) that makes the `/api` route available to the web app securely without requiring custom CORS rules. |||
31+
| [Distributed functions (preview)](./distributed-functions.md) for dynamic global distribution of backend compute. |||
3132
| [Durable Functions](../azure-functions/durable/durable-functions-overview.md) programming model |||
3233
| [Managed identity](../app-service/overview-managed-identity.md) |||
3334
| [Azure App Service Authentication and Authorization](../app-service/configure-authentication-provider-aad.md) token management |||
@@ -38,6 +39,9 @@ The following table contrasts the differences between using managed and existing
3839

3940
[!INCLUDE [APIs overview](../../includes/static-web-apps-apis-overview.md)]
4041

42+
> [!NOTE]
43+
> [Distributed functions](./distributed-functions.md) is available with managed functions. Distributed functions automatically distribute your managed functions to regions of high request loads.
44+
4145
## Configuration
4246

4347
API endpoints are available to the web app through the `api` route.
@@ -60,7 +64,7 @@ In addition to the Static Web Apps API [constraints](apis-overview.md#constraint
6064

6165
| Managed functions | Bring your own functions |
6266
|---|---|
63-
| <ul><li>Triggers and bindings are limited to [HTTP](../azure-functions/functions-bindings-http-webhook.md).</li><li>The Azure Functions app must either be in Node.js 12, Node.js 14, Node.js 16, Node.js 18 (public preview), .NET Core 3.1, .NET 6.0, Python 3.8, Python 3.9 or Python 3.10 .</li><li>Some application settings are managed by the service, therefore the following prefixes are reserved by the runtime:<ul><li>*APPSETTING\_, AZUREBLOBSTORAGE\_, AZUREFILESSTORAGE\_, AZURE_FUNCTION\_, CONTAINER\_, DIAGNOSTICS\_, DOCKER\_, FUNCTIONS\_, IDENTITY\_, MACHINEKEY\_, MAINSITE\_, MSDEPLOY\_, SCMSITE\_, SCM\_, WEBSITES\_, WEBSITE\_, WEBSOCKET\_, AzureWeb*</li></ul></li><li>Some application tags are internally used by the service. Therefore, the following tags are reserved:<ul><li> *AccountId, EnvironmentId, FunctionAppId*.</li></ul></li></ul> | <ul><li>You are responsible to manage the Functions app deployment.</li></ul> |
67+
| <ul><li>Triggers and bindings are limited to [HTTP](../azure-functions/functions-bindings-http-webhook.md).</li><li>The Azure Functions app must either be in Node.js 12, Node.js 14, Node.js 16, Node.js 18 (public preview), .NET Core 3.1, .NET 6.0, Python 3.8, Python 3.9 or Python 3.10.</li><li>Some application settings are managed by the service, therefore the following prefixes are reserved by the runtime:<ul><li>*APPSETTING\_, AZUREBLOBSTORAGE\_, AZUREFILESSTORAGE\_, AZURE_FUNCTION\_, CONTAINER\_, DIAGNOSTICS\_, DOCKER\_, FUNCTIONS\_, IDENTITY\_, MACHINEKEY\_, MAINSITE\_, MSDEPLOY\_, SCMSITE\_, SCM\_, WEBSITES\_, WEBSITE\_, WEBSOCKET\_, AzureWeb*</li></ul></li><li>Some application tags are internally used by the service. Therefore, the following tags are reserved:<ul><li> *AccountId, EnvironmentId, FunctionAppId*.</li></ul></li></ul> | <ul><li>You are responsible to manage the Functions app deployment.</li></ul> |
6468

6569
## Next steps
6670

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Distributed managed functions in Azure Static Web Apps (preview)
3+
description: Configure dynamic distribution of your Static Web Apps managed functions to high request load regions.
4+
services: static-web-apps
5+
author: craigshoemaker
6+
ms.service: static-web-apps
7+
ms.topic: how-to
8+
ms.date: 03/12/2024
9+
ms.author: cshoe
10+
---
11+
12+
# Distributed managed functions in Azure Static Web Apps (preview)
13+
14+
As requests to your APIs increase, you often want to distribute your APIs to the Azure regions getting the most demand. When you enable dynamic distribution, your API functions are automatically replicated to the regions closest to highest levels of incoming requests. For each request, Azure automatically directs traffic to the most appropriate region. Distributing your APIs reduces network latency and increases application performance and reliability of your static web app.
15+
16+
Distributed functions are only available on the [Standard hosting plan](plans.md).
17+
18+
19+
Distributed functions can help reduce your network latency by up to 70%. Decreased network latency leads to improved performance and responsiveness of web applications with global audiences. Distributed functions can also improve application performance when quick response times are needed for responsive personalization, routing or authorization.
20+
21+
Distributed functions only apply to the production environment of your static web app.
22+
23+
> [!NOTE]
24+
> Distributed functions is not compatible with Next.js hybrid rendering applications.
25+
26+
## Enable distributed functions
27+
28+
Before enabling distributed functions, make sure your static web app is under the Standard hosting plan with managed functions.
29+
30+
Use the following steps to enable distributed functions.
31+
32+
1. Open your static web app in the Azure portal.
33+
34+
1. From the *Settings* section, select **APIs**.
35+
36+
1. Check the box labeled **Distributed functions**.
37+
38+
1. Select **Confirm**.
39+
40+
## Next steps
41+
42+
> [!div class="nextstepaction"]
43+
> [Use preview environments](preview-environments.md)

0 commit comments

Comments
 (0)