One of my most valuable take from Integrate 2019 is the tip from Derek Li regarding fault code 429, Rate Limit Exceeded, in Logic Apps.
Why is this valuable? Well we have some integrations where we pick up files from on-prem via the File Connector and Azure Data Gateway. Sometimes files arrives in bursts, maybe 200-300 files at the same time. The problem we get then is 429. Especially when the retry is exceeded and the Logic App fails.
So back home from London and Integrate 2019 I tried the tip from Derek Li and it worked like a charm.
One backdraft is that the designer cannot decide which connector being used (as you can see in the picture).
The trick is to define a number of api connections (5 in this case) and when using the connection in “Get_file_content_using_path” name it dynamically like this: “@parameters(‘$connections’)[concat(‘filesystem_’,rand(1,6))][‘connectionId’]”. One of the connection “filesystem_1” to “filesystem_5” will then be used. Randomly in each loop. Below is a snippet of the ARM template.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
"Get_file_content_using_path": { "runAfter": {}, "type": "ApiConnection", "inputs": { "host": { "connection": { "name": "@parameters('$connections')[concat('filesystem_',rand(1,6))]['connectionId']" } }, "method": "get", "path": "/datasets/default/GetFileContentByPath", "queries": { "inferContentType": false, "path": "@items('For_each')?['Path']", "queryParametersSingleEncoded": true } } } |
To see the throttling limit of a certain connector, check the web page, the file system connector for instance can handle 100 calls per minute.