Skip to content

Commit e2d8c7b

Browse files
authored
Merge pull request #201742 from nzthiago/master
Updates the wording on slot swap and deploy impact
2 parents 3e66479 + 9b8e4c6 commit e2d8c7b

File tree

4 files changed

+51
-49
lines changed

4 files changed

+51
-49
lines changed

articles/azure-functions/functions-deployment-slots.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Azure Functions deployment slots allow your function app to run different instan
1212

1313
The following reflect how functions are affected by swapping slots:
1414

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.
1717

1818
## Why use slots?
1919

@@ -52,28 +52,28 @@ Some configuration settings are slot-specific. The following lists detail which
5252

5353
**Slot-specific settings**:
5454

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)
6363

6464
**Non slot-specific settings**:
6565

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 *
7575

76-
Features marked with an asterisk (*) are planned to be unswapped.
76+
Features marked with an asterisk (*) are planned to be unswapped.
7777

7878
> [!NOTE]
7979
> 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
138138
:::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":::
139139

140140
1. Verify the configuration settings for your swap and select **Swap**
141-
141+
142142
:::image type="content" source="./media/functions-deployment-slots/azure-functions-deployment-slots-swap-config.png" alt-text="Swap the deployment slot." border="true":::
143143

144144
The operation may take a moment while the swap operation is executing.

articles/azure-functions/functions-deployment-technologies.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.date: 05/18/2022
99

1010
# Deployment technologies in Azure Functions
1111

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.
1313

1414
## Deployment methods
1515

@@ -19,7 +19,7 @@ The following table describes the available deployment methods for your Function
1919

2020
| Deployment type | Methods | Best for... |
2121
| -- | -- | -- |
22-
| Tools-based | &bull;&nbsp;[Visual&nbsp;Studio&nbsp;Code&nbsp;publish](functions-develop-vs-code.md#publish-to-azure)<br/>&bull;&nbsp;[Visual Studio publish](functions-develop-vs.md#publish-to-azure)<br/>&bull;&nbsp;[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 | &bull;&nbsp;[Visual&nbsp;Studio&nbsp;Code&nbsp;publish](functions-develop-vs-code.md#publish-to-azure)<br/>&bull;&nbsp;[Visual Studio publish](functions-develop-vs.md#publish-to-azure)<br/>&bull;&nbsp;[Core Tools publish](functions-run-local.md#publish) | Deployments during development and other ad hoc deployments. Deployments are managed locally by the tooling. |
2323
| App Service-managed| &bull;&nbsp;[Deployment&nbsp;Center&nbsp;(CI/CD)](functions-continuous-deployment.md)<br/>&bull;&nbsp;[Container&nbsp;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).|
2424
| External pipelines|&bull;&nbsp;[Azure Pipelines](functions-how-to-azure-devops.md)<br/>&bull;&nbsp;[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. |
2525

@@ -58,9 +58,9 @@ Some key concepts are critical to understanding how deployments work in Azure Fu
5858

5959
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:
6060

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.
6464

6565
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.
6666

@@ -81,8 +81,8 @@ When an app is deployed to Windows, language-specific commands, like `dotnet res
8181

8282
To enable remote build on Linux, the following [application settings](functions-how-to-use-azure-function-app-settings.md#settings) must be set:
8383

84-
* `ENABLE_ORYX_BUILD=true`
85-
* `SCM_DO_BUILD_DURING_DEPLOYMENT=true`
84+
+ `ENABLE_ORYX_BUILD=true`
85+
+ `SCM_DO_BUILD_DURING_DEPLOYMENT=true`
8686

8787
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.
8888

@@ -108,7 +108,7 @@ You can use an external package URL to reference a remote package (.zip) file th
108108
>
109109
>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.
110110
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.
112112
113113
### Zip deploy
114114

@@ -126,8 +126,8 @@ You can deploy a Linux container image that contains your function app.
126126

127127
>__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:
128128
>
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).
131131
>
132132
>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.
133133
@@ -183,9 +183,9 @@ In the portal-based editor, you can directly edit the files that are in your fun
183183
184184
>__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:
185185
>
186-
>* [Visual Studio Code](./create-first-function-vs-code-csharp.md)
187-
>* [Azure Functions Core Tools (command line)](functions-run-local.md)
188-
>* [Visual Studio](functions-create-your-first-function-visual-studio.md)
186+
>+ [Visual Studio Code](./create-first-function-vs-code-csharp.md)
187+
>+ [Azure Functions Core Tools (command line)](functions-run-local.md)
188+
>+ [Visual Studio](functions-create-your-first-function-visual-studio.md)
189189
190190
The following table shows the operating systems and languages that support portal editing:
191191

@@ -204,7 +204,7 @@ The following table shows the operating systems and languages that support porta
204204

205205
## Deployment behaviors
206206

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.
208208

209209
If you need more control over this transition, you should use deployment slots.
210210

articles/azure-functions/performance-reliability.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ Assume your function could encounter an exception at any time. Design your funct
4747

4848
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.
4949

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).
5151

5252
If a queue item was already processed, allow your function to be a no-op.
5353

5454
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).
5555

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+
5658
## Function organization best practices
5759

5860
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

Comments
 (0)