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/azure-functions/functions-deployment-slots.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@ Azure Functions deployment slots allow your function app to run different instan
12
12
13
13
The following reflect how functions are affected by swapping slots:
14
14
15
-
- Traffic redirection is seamless; no requests are dropped because of a swap.
16
-
-If a function is running during a swap, execution continues and the next triggers are routed to the swapped app instance.
15
+
- Traffic redirection is seamless; no requests are dropped because of a swap. This seamless behavior is a result of the next function triggers being routed to the swapped slot.
16
+
-Currently executing function are terminated during the swap. Please review [Improve the performance and reliability of Azure Functions](performance-reliability.md#write-functions-to-be-stateless) to learn how to write stateless and defensive functions.
17
17
18
18
## Why use slots?
19
19
@@ -52,28 +52,28 @@ Some configuration settings are slot-specific. The following lists detail which
52
52
53
53
**Slot-specific settings**:
54
54
55
-
* Publishing endpoints
56
-
* Custom domain names
57
-
* Non-public certificates and TLS/SSL settings
58
-
* Scale settings
59
-
* IP restrictions
60
-
* Always On
61
-
* Diagnostic settings
62
-
* Cross-origin resource sharing (CORS)
55
+
- Publishing endpoints
56
+
- Custom domain names
57
+
- Non-public certificates and TLS/SSL settings
58
+
- Scale settings
59
+
- IP restrictions
60
+
- Always On
61
+
- Diagnostic settings
62
+
- Cross-origin resource sharing (CORS)
63
63
64
64
**Non slot-specific settings**:
65
65
66
-
* General settings, such as framework version, 32/64-bit, web sockets
67
-
* App settings (can be configured to stick to a slot)
68
-
* Connection strings (can be configured to stick to a slot)
69
-
* Handler mappings
70
-
* Public certificates
71
-
* Hybrid connections *
72
-
* Virtual network integration *
73
-
* Service endpoints *
74
-
* Azure Content Delivery Network *
66
+
- General settings, such as framework version, 32/64-bit, web sockets
67
+
- App settings (can be configured to stick to a slot)
68
+
- Connection strings (can be configured to stick to a slot)
69
+
- Handler mappings
70
+
- Public certificates
71
+
- Hybrid connections *
72
+
- Virtual network integration *
73
+
- Service endpoints *
74
+
- Azure Content Delivery Network *
75
75
76
-
Features marked with an asterisk (*) are planned to be unswapped.
76
+
Features marked with an asterisk (*) are planned to be unswapped.
77
77
78
78
> [!NOTE]
79
79
> Certain app settings that apply to unswapped settings are also not swapped. For example, since diagnostic settings are not swapped, related app settings like `WEBSITE_HTTPLOGGING_RETENTION_DAYS` and `DIAGNOSTICS_AZUREBLOBRETENTIONDAYS` are also not swapped, even if they don't show up as slot settings.
@@ -138,7 +138,7 @@ You can swap slots via the [CLI](/cli/azure/functionapp/deployment/slot#az-funct
138
138
:::image type="content" source="./media/functions-deployment-slots/functions-swap-deployment-slot.png" alt-text="Screenshot that shows the 'Deployment slot' page with the 'Add Slot' action selected." border="true":::
139
139
140
140
1. Verify the configuration settings for your swap and select **Swap**
141
-
141
+
142
142
:::image type="content" source="./media/functions-deployment-slots/azure-functions-deployment-slots-swap-config.png" alt-text="Swap the deployment slot." border="true":::
143
143
144
144
The operation may take a moment while the swap operation is executing.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-deployment-technologies.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.date: 05/18/2022
9
9
10
10
# Deployment technologies in Azure Functions
11
11
12
-
You can use a few different technologies to deploy your Azure Functions project code to Azure. This article provides an overview of the deployment methods available to you and recommendations for the best method to use in various scenarios. It also provides an exhaustive list of and key details about the underlying deployment technologies.
12
+
You can use a few different technologies to deploy your Azure Functions project code to Azure. This article provides an overview of the deployment methods available to you and recommendations for the best method to use in various scenarios. It also provides an exhaustive list of and key details about the underlying deployment technologies.
13
13
14
14
## Deployment methods
15
15
@@ -19,7 +19,7 @@ The following table describes the available deployment methods for your Function
19
19
20
20
| Deployment type | Methods | Best for... |
21
21
| -- | -- | -- |
22
-
| Tools-based |• [Visual Studio Code publish](functions-develop-vs-code.md#publish-to-azure)<br/>• [Visual Studio publish](functions-develop-vs.md#publish-to-azure)<br/>• [Core Tools publish](functions-run-local.md#publish)| Deployments during development and other ad hoc deployments. Deployments are managed locally by the tooling. |
22
+
| Tools-based |• [Visual Studio Code publish](functions-develop-vs-code.md#publish-to-azure)<br/>• [Visual Studio publish](functions-develop-vs.md#publish-to-azure)<br/>• [Core Tools publish](functions-run-local.md#publish)| Deployments during development and other ad hoc deployments. Deployments are managed locally by the tooling. |
23
23
| App Service-managed|• [Deployment Center (CI/CD)](functions-continuous-deployment.md)<br/>• [Container deployments](functions-create-function-linux-custom-image.md#enable-continuous-deployment-to-azure)| Continuous deployment (CI/CD) from source control or from a container registry. Deployments are managed by the App Service platform (Kudu).|
24
24
| External pipelines|• [Azure Pipelines](functions-how-to-azure-devops.md)<br/>• [GitHub Actions](functions-how-to-github-actions.md)| Production and DevOps pipelines that include additional validation, testing, and other actions be run as part of an automated deployment. Deployments are managed by the pipeline. |
25
25
@@ -58,9 +58,9 @@ Some key concepts are critical to understanding how deployments work in Azure Fu
58
58
59
59
When you change any of your triggers, the Functions infrastructure must be aware of the changes. Synchronization happens automatically for many deployment technologies. However, in some cases, you must manually sync your triggers. When you deploy your updates by referencing an external package URL, local Git, cloud sync, or FTP, you must manually sync your triggers. You can sync triggers in one of three ways:
60
60
61
-
* Restart your function app in the Azure portal.
62
-
* Send an HTTP POST request to `https://{functionappname}.azurewebsites.net/admin/host/synctriggers?code=<API_KEY>` using the [master key](functions-bindings-http-webhook-trigger.md#authorization-keys).
63
-
* Send an HTTP POST request to `https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP_NAME>/providers/Microsoft.Web/sites/<FUNCTION_APP_NAME>/syncfunctiontriggers?api-version=2016-08-01`. Replace the placeholders with your subscription ID, resource group name, and the name of your function app.
61
+
+ Restart your function app in the Azure portal.
62
+
+ Send an HTTP POST request to `https://{functionappname}.azurewebsites.net/admin/host/synctriggers?code=<API_KEY>` using the [master key](functions-bindings-http-webhook-trigger.md#authorization-keys).
63
+
+ Send an HTTP POST request to `https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP_NAME>/providers/Microsoft.Web/sites/<FUNCTION_APP_NAME>/syncfunctiontriggers?api-version=2016-08-01`. Replace the placeholders with your subscription ID, resource group name, and the name of your function app.
64
64
65
65
When you deploy using an external package URL and the contents of the package change but the URL itself doesn't change, you need to manually restart your function app to fully sync your updates.
66
66
@@ -81,8 +81,8 @@ When an app is deployed to Windows, language-specific commands, like `dotnet res
81
81
82
82
To enable remote build on Linux, the following [application settings](functions-how-to-use-azure-function-app-settings.md#settings) must be set:
83
83
84
-
*`ENABLE_ORYX_BUILD=true`
85
-
*`SCM_DO_BUILD_DURING_DEPLOYMENT=true`
84
+
+`ENABLE_ORYX_BUILD=true`
85
+
+`SCM_DO_BUILD_DURING_DEPLOYMENT=true`
86
86
87
87
By default, both [Azure Functions Core Tools](functions-run-local.md) and the [Azure Functions Extension for Visual Studio Code](./create-first-function-vs-code-csharp.md#publish-the-project-to-azure) perform remote builds when deploying to Linux. Because of this, both tools automatically create these settings for you in Azure.
88
88
@@ -108,7 +108,7 @@ You can use an external package URL to reference a remote package (.zip) file th
108
108
>
109
109
>If you use Azure Blob storage, use a private container with a [shared access signature (SAS)](../vs-azure-tools-storage-manage-with-storage-explorer.md#generate-a-sas-in-storage-explorer) to give Functions access to the package. Any time the application restarts, it fetches a copy of the content. Your reference must be valid for the lifetime of the application.
110
110
111
-
>__When to use it:__ External package URL is the only supported deployment method for Azure Functions running on Linux in the Consumption plan, if the user doesn't want a [remote build](#remote-build) to occur. When you update the package file that a function app references, you must [manually sync triggers](#trigger-syncing) to tell Azure that your application has changed. When you change the contents of the package file and not the URL itself, you must also restart your function app manually.
111
+
>__When to use it:__ External package URL is the only supported deployment method for Azure Functions running on Linux in the Consumption plan, if the user doesn't want a [remote build](#remote-build) to occur. When you update the package file that a function app references, you must [manually sync triggers](#trigger-syncing) to tell Azure that your application has changed. When you change the contents of the package file and not the URL itself, you must also restart your function app manually.
112
112
113
113
### Zip deploy
114
114
@@ -126,8 +126,8 @@ You can deploy a Linux container image that contains your function app.
126
126
127
127
>__How to use it:__ Create a Linux function app in the Premium or Dedicated plan and specify which container image to run from. You can do this in two ways:
128
128
>
129
-
>* Create a Linux function app on an Azure App Service plan in the Azure portal. For **Publish**, select **Docker Image**, and then configure the container. Enter the location where the image is hosted.
130
-
>* Create a Linux function app on an App Service plan by using the Azure CLI. To learn how, see [Create a function on Linux by using a custom image](functions-create-function-linux-custom-image.md#create-supporting-azure-resources-for-your-function).
129
+
>+ Create a Linux function app on an Azure App Service plan in the Azure portal. For **Publish**, select **Docker Image**, and then configure the container. Enter the location where the image is hosted.
130
+
>+ Create a Linux function app on an App Service plan by using the Azure CLI. To learn how, see [Create a function on Linux by using a custom image](functions-create-function-linux-custom-image.md#create-supporting-azure-resources-for-your-function).
131
131
>
132
132
>To deploy to a Kubernetes cluster as a custom container, in [Azure Functions Core Tools](functions-run-local.md), use the [`func kubernetes deploy`](functions-core-tools-reference.md#func-kubernetes-deploy) command.
133
133
@@ -183,9 +183,9 @@ In the portal-based editor, you can directly edit the files that are in your fun
183
183
184
184
>__When to use it:__ The portal is a good way to get started with Azure Functions. For more intense development work, we recommend that you use one of the following client tools:
185
185
>
186
-
>*[Visual Studio Code](./create-first-function-vs-code-csharp.md)
The following table shows the operating systems and languages that support portal editing:
191
191
@@ -204,7 +204,7 @@ The following table shows the operating systems and languages that support porta
204
204
205
205
## Deployment behaviors
206
206
207
-
When you do a deployment, all existing executions are allowed to complete or time out, after which the new code is loaded to begin processing requests.
207
+
When you deploy updates to your function app code, currently executing functions are terminated. After deployment completes, the new code is loaded to begin processing requests. Please review [Improve the performance and reliability of Azure Functions](performance-reliability.md#write-functions-to-be-stateless) to learn how to write stateless and defensive functions.
208
208
209
209
If you need more control over this transition, you should use deployment slots.
Copy file name to clipboardExpand all lines: articles/azure-functions/performance-reliability.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,12 +47,14 @@ Assume your function could encounter an exception at any time. Design your funct
47
47
48
48
Depending on how complex your system is, you may have: involved downstream services behaving badly, networking outages, or quota limits reached, etc. All of these can affect your function at any time. You need to design your functions to be prepared for it.
49
49
50
-
How does your code react if a failure occurs after inserting 5,000 of those items into a queue for processing? Track items in a set that you’ve completed. Otherwise, you might insert them again next time. This double-insertion can have a serious impact on your work flow, so [make your functions idempotent](functions-idempotent.md).
50
+
How does your code react if a failure occurs after inserting 5,000 of those items into a queue for processing? Track items in a set that you’ve completed. Otherwise, you might insert them again next time. This double-insertion can have a serious impact on your work flow, so [make your functions idempotent](functions-idempotent.md).
51
51
52
52
If a queue item was already processed, allow your function to be a no-op.
53
53
54
54
Take advantage of defensive measures already provided for components you use in the Azure Functions platform. For example, see **Handling poison queue messages** in the documentation for [Azure Storage Queue triggers and bindings](functions-bindings-storage-queue-trigger.md#poison-messages).
55
55
56
+
For HTTP based functions consider [API versioning strategies](/azure/architecture/reference-architectures/serverless/web-app#api-versioning) with Azure API Management. For example, if you have to update your HTTP based function app, deploy the new update to a separate function app and use API Management revisions or versions to direct clients to the new version or revision. Once all clients are using the version or revision and no more executions are left on the previous function app, you can deprovision the previous function app.
57
+
56
58
## Function organization best practices
57
59
58
60
As part of your solution, you may develop and publish multiple functions. These functions are often combined into a single function app, but they can also run in separate function apps. In Premium and dedicated (App Service) hosting plans, multiple function apps can also share the same resources by running in the same plan. How you group your functions and function apps can impact the performance, scaling, configuration, deployment, and security of your overall solution. There aren't rules that apply to every scenario, so consider the information in this section when planning and developing your functions.
0 commit comments