Azure Function & Document DB

I am wondering how scaling works with Azure features regarding output in Document DB.

Basically, what happens when a Document DB returns 429 because I have exceeded the allocated bandwidth? I ask, because when I had the lowest level of Azure functions combined with the lowest level of Document DB and continued to call the function 1000 times in 20 seconds, I only saw 700-800 actual documents inserted into my db document collection. When I scaled Document DB to the maximum with the same low level of function again, I received only 700-800 documents in my doc db collection. However, when I scaled the function to max with the db document at max, I get all 1000. When I drop the doc db to the minimum, I get only 300 pieces ... although it looks like I locked the db document and it still repeats insert until it succeeds.

So, I just got confused about what this scaling is, and if I could get some idea, so I could better configure various aspects of a function or application.

+5
source share
1 answer

Yes, he is currently retrying at 429, awaiting the proposed amount of time according to DocDB's answer. There is currently no absolute timeout, so the retries will continue until they pass (I will check right now if this is the expected behavior).

In your first scenario, if you wait long enough to remove the throttle, will all 1000 appear in the end?

I would like to try repeating this: do you insert 1000 elements into the queue before you enable your function? Or call it another way?

The specific retry code that works here if you're interested: https://github.com/Azure/azure-webjobs-sdk-extensions/blob/master/src/WebJobs.Extensions.DocumentDB/DocumentDBUtility.cs#L36

+6
source

Source: https://habr.com/ru/post/1246585/


All Articles