I have an external API which invokes my HTTP trigger azure function with the same query parameters 5 times at the same moment. So 5 requests are processed in the same time concurrently, each request adds a record to my google sheet and it causes unwanted duplicated records. My function is checking for duplicate in that sheet before pushing new record but when 5 instances are called a the same time concurrently, duplicate does not exist. Is there any simple solution to achieve processing those 5 request one by one, without concurrency?
How to prevent azure function from executing n-time simultaneously?
574 Views Asked by Hawos At
1
There are 1 best solutions below
Related Questions in AZURE
- How to update to the latest external Git in Azure Web App?
- I need an azure product that executes my intensive ffmpeg command then dies, and i only get charged for the delta. Any Tips?
- Inject AsyncCollector into a service
- mutual tls authentication between app service and function app
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Application settings for production deployment slot in Azure App Services
- Encountered an error (ServiceUnavailable) from host runtime on Azure Function App
- Implementing Incremental consent when using both application and delegated permissions
- Invalid format for email address in WordPress on Azure app service
- Producer Batching Service Bus Vs Kafka
- Integrating Angular External IP with ClusterIP of .NET microservices on AKS
- Difficulty creating a data pipeline with Fabric Datafactory using REST
- Azure Batch for Excel VBA
- How to authenticate only Local and Guest users in Azure AD B2C and add custom claims in token?
- Azure Scale Sets and Parallel Jobs
Related Questions in AZURE-FUNCTIONS
- Azure Function: switch from consumption to premium plan for 1 hour daily automatically?
- mutual tls authentication between app service and function app
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Encountered an error (ServiceUnavailable) from host runtime on Azure Function App
- How to migrate from Azure Static Web Apps to Azure App Service?
- Logic Apps and long running Azure Function (Powershell)
- Not getting Information or Trace logs in Application Insights in .NET 8 function
- Azure Queue Functions | Trigger when multiple queue functions executions with a specific message property ends
- No HTTP Trigger Found In Azure function
- Python middleware for azure function warmup
- Problem deploying an Azure Function to a Function App
- Logic App Function App reading and writing Binary Files
- SwaggerUI on Azure Functions (.NET 8 Update)
- Azure Function Javascript Invocation hooks usage with HTTP triggers
- Error indexing method 'IntegrationFunction' Can't convert from type 'Microsoft.Azure.EventHubs.EventData
Related Questions in AZURE-CONFIGURATION
- Simulator or Azure App Configuration that can be work locally
- Retrieving Web Site Configuration Settings from Azure for use in a Console App
- Tutorial: Use dynamic configuration in an Azure Functions does not work in NET 8.0 because appUseAzureAppConfiguration
- How can I add a Json string in a launchsettings.json file in my app and read the values?
- Connection string not available in azure app via environment
- az functionapp config appsettinggs set: Will not allow me to use a variable in --settings parameter
- How can I get the variable list and their value using azure connection string?
- Azure App Configuration not updated when Sentinel value changes
- Is there a way for a WebJob to read in a custom configuration section, like AppSettings?
- How to import azure app configuration to local visual studio?
- Azure connection string does not overwrite appsettings.json
- How to prevent azure function from executing n-time simultaneously?
- Cannot edit config after creating Azure app service yaml file
- Terraform Error 'the number of path segments is not divisible by 2' creating Azure Configuration Keys
- Dynamic configuration for a .NET 5 web app using Azure App Config not working
Related Questions in AZURE-HTTP-TRIGGER
- No HTTP Trigger Found In Azure function
- The type or namespace name 'Id' could not be found (are you missing a using directive or an assembly reference?) CosmosDBOutput Problem
- Azure function not executing when called from another function: Time out error
- How to get client IP address for isolated .net 8 running in Azure Functions (breaking change?)
- setting a function timeout on azure functions
- How can I get my Durable Function activities to inherit the tracing id of the HttpTrigger that started it?
- Azure Functions Node.js typescript global variable
- Azure Function: use parameter for SqlQuery from ClaimsPrincipal
- How to access http status in Azure Function v4
- Azure Function deployment using VS code
- How to read and XML file and convert the same to a CSV file using Azure function?, also the XML file name and the new CSV name should be parameterized
- Pass parameter value containing = sign into sql input binding to the stored procedure in Azure Function HttpTrigger using .net 7.0 isolated process?
- Azure HttpTriggers in referenced assembly are not detected by JobHost
- Logic App HTTP action - Sharepoint REST API - Managed Identity - 401 unauthorized error
- Installing python packages locally for Azure Function App
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I have same trouble here but with CosmosDB. If I make x times same request at same time on Azure Function it just query for a property in Cosmos, but it already doesn't exists and duplicate the insertion but with different ID.
I'm looking for a solution, but the best I anchieved until now is to use [Singleton] decorator on .Net environment. It makes the function finish a request before start another one.
If anyone have another solution, please post here.
Some more information about my duplicated data:
Edit:
Today I found that: https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#scope-values
and make something like this:
It worked to me. If there is a Function instance running with same "anyParameter" parameter it executes like an queue. If the parameters are different it create another instace and run on another Function Instance;
Watching to Application Insights it shows that requisitions with the same "anyParameter" execute like in queue, and duration time of function Increase for every request. But with another value to "anyParameter" it really creates another instance and the requisitions are being completed at the same speed time.