I have a webjob and a blob storage on Azure. When a message comes to the blob storage, webjob will take this message and work with it somehow. The webjob polles the blob storage in some interval. I want to set maxPollingInterval in as minimal value as possible. The minimum is 100ms. Are there are any drawbacks to this decision?
Tight polling loops can be problematic - if they are synchronous, they can result in long waits while files are processed. If they are asynchronous they could pick up the same file twice as it may not finish processing before the next poll.
If you want the fastest response possible, prefer a Blob Trigger. You can use this with an Azure function and I believe WebJobs too. This will allow you to respond as fast as possible.
[FunctionName("BlobTriggerCSharp")]
public static void Run([BlobTrigger("samples-workitems/{name}")] Stream myBlob, string name, ILogger log)
{
log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
}
This answer also helps explain the similarities and differences between functions and webjobs.