Azure Function Data Streaming Limitations: 10 Hz Processing Issue Explained
Hi there,
If you’re using Azure Functions to save data in CosmosDB for Mongo, you may have run into a common issue. While this setup usually works well, some messages might go missing when the incoming flow reaches 10 Hz. It seems like the Azure Function’s performance might not be up to speed.
Your Azure Function is set up on an Azure Service Plan with a P2v3 pricing plan, which is a good start. But let’s dig deeper into what could be causing the problem.
In your Python code, it seems like you’re creating a new database connection with every call to the Azure Function. This might be overwhelming the system, especially at high data flow rates like 10 Hz. Have you considered reusing an existing connection to avoid this issue?
Testing the Azure Function without any complex logic could help isolate the problem. By simply triggering the function and logging the calls, you can check if handling 10 Hz is the root cause of the missing messages.
I hope this helps shed some light on the situation. If you find a solution or need further assistance, feel free to reach out. We’re here to help!
Best,
[Your Name]