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
You can pin a diagram or table to one of your [shared dashboards](app-insights-dashboards.md) - just click the pin. (You might need to [upgrade your app's pricing package](app-insights-pricing.md) to turn on this feature.)
136
+
You can pin a diagram or table to one of your [shared dashboards](app-insights-dashboards.md) - just click the pin.
137
137
138
138

Copy file name to clipboardExpand all lines: articles/azure-functions/functions-dotnet-class-library.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,8 @@ In addition to script files, Azure Functions supports publishing a class library
27
27
28
28
This article has the following prerequisites:
29
29
30
-
-[Visual Studio 2017 15.3 Preview](https://www.visualstudio.com/vs/preview/). Install the workloads **ASP.NET and web development** and **Azure development**.
31
-
-[Azure Function Tools for Visual Studio 2017](https://marketplace.visualstudio.com/items?itemName=AndrewBHall-MSFT.AzureFunctionToolsforVisualStudio2017)
30
+
-[Visual Studio 2017 version 15.3](https://www.visualstudio.com/vs/), or a later version.
31
+
-Install the **Azure development** workload.
32
32
33
33
## Functions class library project
34
34
@@ -73,7 +73,7 @@ The following table lists the triggers and bindings that are available in an Azu
73
73
74
74
Azure Functions supports trigger, input, and output bindings for Azure Blob storage. For more information on binding expressions and metadata, see [Azure Functions Blob storage bindings](functions-bindings-storage-blob.md).
75
75
76
-
A blob trigger is defined with the `[BlobTrigger]` attribute. You can use the attribute `[StorageAccount]` to define the storage account that is used by an entire function or class.
76
+
A blob trigger is defined with the `[BlobTrigger]` attribute. You can use the attribute `[StorageAccount]` to define the app setting name that contains the connection string to the storage account that is used by an entire function or class.
77
77
78
78
```csharp
79
79
[StorageAccount("AzureWebJobsStorage")]
@@ -242,7 +242,7 @@ Azure Functions supports an output binding for Notification Hubs. To learn more,
242
242
243
243
Azure Functions supports trigger and output bindings for Azure queues. For more information, see [Azure Functions Queue Storage bindings](functions-bindings-storage-queue.md).
244
244
245
-
The following example shows how to use the function return type with a queue output binding, using the `[Queue]` attribute. To define a queue trigger, use the `[QueueTrigger]` attribute.
245
+
The following example shows how to use the function return type with a queue output binding, using the `[Queue]` attribute.
246
246
247
247
```csharp
248
248
[StorageAccount("AzureWebJobsStorage")]
@@ -256,7 +256,15 @@ public static class QueueFunctions
256
256
log.Info($"C# function processed: {input.Text}");
257
257
returninput.Text;
258
258
}
259
+
}
260
+
261
+
```
259
262
263
+
To define a queue trigger, use the `[QueueTrigger]` attribute.
264
+
```csharp
265
+
[StorageAccount("AzureWebJobsStorage")]
266
+
publicstaticclassQueueFunctions
267
+
{
260
268
// Queue trigger
261
269
[FunctionName("QueueTrigger")]
262
270
[StorageAccount("AzureWebJobsStorage")]
@@ -268,6 +276,7 @@ public static class QueueFunctions
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-overview.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.devlang: multiple
15
15
ms.topic: overview
16
16
ms.tgt_pltfrm: multiple
17
17
ms.workload: na
18
-
ms.date: 02/27/2017
18
+
ms.date: 10/03/2017
19
19
ms.author: glenga
20
20
21
21
ms.custom: H1Hack27Feb2017, mvc
@@ -46,6 +46,7 @@ Functions provides templates to get you started with key scenarios, including th
46
46
***TimerTrigger** - Execute cleanup or other batch tasks on a predefined schedule. For an example, see [Create a function triggered by a timer](functions-create-scheduled-function.md).
47
47
***GitHub webhook** - Respond to events that occur in your GitHub repositories. For an example, see [Create a function triggered by a GitHub webhook](functions-create-github-webhook-triggered-function.md).
48
48
***Generic webhook** - Process webhook HTTP requests from any service that supports webhooks. For an example, see [Create a function triggered by a generic webhook](functions-create-generic-webhook-triggered-function.md).
49
+
***CosmosDBTrigger** - Process Azure Cosmos DB documents when they are added or updated in collections in a NoSQL database. For an example, see [Create a function triggered by Azure Cosmos DB](functions-create-cosmos-db-triggered-function.md).
49
50
***BlobTrigger** - Process Azure Storage blobs when they are added to containers. You might use this function for image resizing. For more information, see [Blob storage bindings](functions-bindings-storage-blob.md).
50
51
***QueueTrigger** - Respond to messages as they arrive in an Azure Storage queue. For an example, see [Create a function that connects to other Azure services](functions-create-an-azure-connected-function.md).
51
52
***EventHubTrigger** - Respond to events delivered to an Azure Event Hub. Particularly useful in application instrumentation, user experience or workflow processing, and Internet of Things (IoT) scenarios. For more information, see [Event Hubs bindings](functions-bindings-event-hubs.md).
To write multiple values to an output binding, use the [`ICollector`](https://github.com/Azure/azure-webjobs-sdk/blob/master/src/Microsoft.Azure.WebJobs/ICollector.cs) or [`IAsyncCollector`](https://github.com/Azure/azure-webjobs-sdk/blob/master/src/Microsoft.Azure.WebJobs/IAsyncCollector.cs) types. These types are write-only collections that are written to the output binding when the method completes.
81
81
82
-
This example writes multiple queue messages using `ICollector`:
82
+
This example writes multiple queue messages into the same queue using `ICollector`:
defines the [Storage blob](functions-bindings-storage-blob.md) input or output binding, and
404
404
[TextWriter](https://msdn.microsoft.com/library/system.io.textwriter.aspx) is a supported output binding type.
405
-
As is, the code gets the default app setting for the Storage account connection string (which is `AzureWebJobsStorage`). You can specify a
406
-
custom app setting to use by adding the
405
+
In the previous code sample, the code gets the app setting for the function app's main Storage account connection string (which is `AzureWebJobsStorage`). You can specify a custom app setting to use for the Storage account by adding the
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-scale.md
+16-14Lines changed: 16 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,9 @@ When you create a function app, you must configure a hosting plan for functions
34
34
* How host instances are scaled out.
35
35
* The resources that are available to each host.
36
36
37
-
Currently, you must choose the plan type during the creation of the function app. You can't change it afterward.
37
+
Currently, you must choose the type of hosting plan during the creation of the function app. You can't change it afterward.
38
38
39
-
You can scale between tiers on the App Service plan. On the Consumption plan, Azure Functions automatically handles all resource allocation.
39
+
On an App Service plan you can scale between tiers to allocate different amount of resources. On the Consumption plan, Azure Functions automatically handles all resource allocation.
40
40
41
41
## Consumption plan
42
42
@@ -45,26 +45,28 @@ When you're using a Consumption plan, instances of the Azure Functions host are
45
45
> [!NOTE]
46
46
> The default timeout for functions on a Consumption plan is 5 minutes. The value can be increased to 10 minutes for the Function App by changing the property `functionTimeout` in [host.json](https://github.com/Azure/azure-webjobs-sdk-script/wiki/host.json).
47
47
48
-
Billing is based on execution time and memory used, and it's aggregated across all functions within a function app. For more information, see the [Azure Functions pricing page].
48
+
Billing is based on number of executions, execution time, and memory used. Billing is aggregated across all functions within a function app. For more information, see the [Azure Functions pricing page].
49
49
50
-
The Consumption plan is the default and offers the following benefits:
50
+
The Consumption plan is the default hosting plan and offers the following benefits:
51
51
- Pay only when your functions are running.
52
52
- Scale out automatically, even during periods of high load.
53
53
54
54
## App Service plan
55
55
56
-
In the App Service plan, your function apps run on dedicated VMs on Basic, Standard, Premium, and Isolated SKUs, similar to Web Apps. Dedicated VMs are allocated to your App Service apps, which means the functions host is always running.
56
+
In the App Service plan, your function apps run on dedicated VMs on Basic, Standard, Premium, and Isolated SKUs, similar to Web Apps, API Apps, and Mobile Apps. Dedicated VMs are allocated to your App Service apps, which means the functions host is always running.
57
57
58
58
Consider an App Service plan in the following cases:
59
59
- You have existing, underutilized VMs that are already running other App Service instances.
60
60
- You expect your function apps to run continuously, or nearly continuously. In this case, an App Service Plan can be more cost-effective.
61
61
- You need more CPU or memory options than what is provided on the Consumption plan.
62
-
- You need to run longer than the maximum execution time allowed on the Consumption plan.
62
+
- You need to run longer than the maximum execution time allowed on the Consumption plan (of 10 minutes).
63
63
- You require features that are only available on an App Service plan, such as support for App Service Environment, VNET/VPN connectivity, and larger VM sizes.
64
64
65
-
A VM decouples cost from both runtime and memory size. As a result, you won't pay more than the cost of the VM instance that you allocate. For details about how the App Service plan works, see the [Azure App Service plans in-depth overview](../app-service/azure-web-sites-web-hosting-plans-in-depth-overview.md).
65
+
A VM decouples cost from number of executions, execution time, and memory used. As a result, you won't pay more than the cost of the VM instance that you allocate. For details about how the App Service plan works, see the [Azure App Service plans in-depth overview](../app-service/azure-web-sites-web-hosting-plans-in-depth-overview.md).
66
66
67
-
With an App Service plan, you can manually scale out by adding more VM instances, or you can enable autoscale. For more information, see [Scale instance count manually or automatically](../monitoring-and-diagnostics/insights-how-to-scale.md?toc=%2fazure%2fapp-service-web%2ftoc.json). You can also scale up by choosing a different App Service plan. For more information, see [Scale up an app in Azure](../app-service/web-sites-scale.md). If you are planning to run JavaScript functions on an App Service plan, you should choose a plan that has fewer cores. For more information, see the [JavaScript reference for Functions](functions-reference-node.md#choose-single-core-app-service-plans).
67
+
With an App Service plan, you can manually scale out by adding more VM instances, or you can enable autoscale. For more information, see [Scale instance count manually or automatically](../monitoring-and-diagnostics/insights-how-to-scale.md?toc=%2fazure%2fapp-service-web%2ftoc.json). You can also scale up by choosing a different App Service plan. For more information, see [Scale up an app in Azure](../app-service/web-sites-scale.md).
68
+
69
+
If you are planning to run JavaScript functions on an App Service plan, you should choose a plan that has fewer cores. For more information, see the [JavaScript reference for Functions](functions-reference-node.md#choose-single-core-app-service-plans).
68
70
69
71
<!-- Note: the portal links to this section via fwlink https://go.microsoft.com/fwlink/?linkid=830855 -->
70
72
<aname="always-on"></a>
@@ -76,33 +78,33 @@ Always On is available only on an App Service plan. On a Consumption plan, the p
76
78
77
79
## Storage account requirements
78
80
79
-
On either a Consumption plan or an App Service plan, a function app requires an Azure Storage account that supports Azure Blob, Queue, and Table storage. Internally, Azure Functions uses Azure Storage for operations such as managing triggers and logging function executions. Some storage accounts do not support queues and tables, such as blob-only storage accounts (including premium storage) and general-purpose storage accounts with zone-redundant storage replication. These accounts are filtered from the **Storage Account** blade when you're creating a function app.
81
+
On either a Consumption plan or an App Service plan, a function app requires a general Azure Storage account that supports Azure Blob, Queue, Files, and Table storage. Internally, Azure Functions uses Azure Storage for operations such as managing triggers and logging function executions. Some storage accounts do not support queues and tables, such as blob-only storage accounts (including premium storage) and general-purpose storage accounts with zone-redundant storage replication. These accounts are filtered from the **Storage Account** blade when you're creating a function app.
80
82
81
83
To learn more about storage account types, see [Introducing the Azure Storage services](../storage/common/storage-introduction.md#introducing-the-azure-storage-services).
82
84
83
85
## How the Consumption plan works
84
86
85
-
The Consumption plan automatically scales CPU and memory resources by adding additional instances of the Functions host, based on the number of events that its functions are triggered on. Each instance of the Functions host is limited to 1.5 GB of memory.
87
+
In the Consumption plan, the scale controller automatically scales CPU and memory resources by adding additional instances of the Functions host, based on the number of events that its functions are triggered on. Each instance of the Functions host is limited to 1.5 GB of memory.
86
88
87
-
When you use the Consumption hosting plan, function code files are stored on Azure Files shares on the main storage account. When you delete the main storage account, this content is deleted and cannot be recovered.
89
+
When you use the Consumption hosting plan, function code files are stored on Azure Files shares on the function's main storage account. When you delete the main storage account of the function app, the function code files are deleted and cannot be recovered.
88
90
89
91
> [!NOTE]
90
92
> When you're using a blob trigger on a Consumption plan, there can be up to a 10-minute delay in processing new blobs if a function app has gone idle. After the function app is running, blobs are processed immediately. To avoid this initial delay, consider one of the following options:
91
-
> -Use an App Service plan with Always On enabled.
93
+
> -Host the function app on an App Service plan, with Always On enabled.
92
94
> - Use another mechanism to trigger the blob processing, such as a queue message that contains the blob name. For an example, see [Queue trigger with blob input binding](functions-bindings-storage-blob.md#input-sample).
93
95
94
96
### Runtime scaling
95
97
96
98
Azure Functions uses a component called the *scale controller* to monitor the rate of events and determine whether to scale out or scale in. The scale controller uses heuristics for each trigger type. For example, when you're using an Azure Queue storage trigger, it scales based on the queue length and the age of the oldest queue message.
97
99
98
-
The unit of scale is the function app. When the function app is scaled out, more resources are allocated to run multiple instances of the Azure Functions host. Conversely, as compute demand is reduced, the scale controller removes function host instances. The number of instances is eventually scaled down to zero when no functions are running within a function app.
100
+
The unit of scale is the function app. When the function app is scaled out, additional resources are allocated to run multiple instances of the Azure Functions host. Conversely, as compute demand is reduced, the scale controller removes function host instances. The number of instances is eventually scaled down to zero when no functions are running within a function app.
99
101
100
102

101
103
102
104
### Billing model
103
105
104
106
Billing for the Consumption plan is described in detail on the [Azure Functions pricing page]. Usage is aggregated at the function app level and counts only the time that function code is executed. The following are units for billing:
105
107
***Resource consumption in gigabyte-seconds (GB-s)**. Computed as a combination of memory size and execution time for all functions within a function app.
106
-
***Executions**. Counted each time a function is executed in response to an event, triggered by a binding.
108
+
***Executions**. Counted each time a function is executed in response to an event trigger.
0 commit comments