Another Throttling question... CSOM / Azure Functions and number of instances

%3CLINGO-SUB%20id%3D%22lingo-sub-173076%22%20slang%3D%22en-US%22%3EAnother%20Throttling%20question...%20CSOM%20%2F%20Azure%20Functions%20and%20number%20of%20instances%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173076%22%20slang%3D%22en-US%22%3E%3CP%3EWe're%20currently%20in%20the%20process%20of%20building%20a%20solution%20that's%20very%20similar%20to%20SharePoint's%20built-in%20Content%20Organizer%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EDocuments%20are%20uploaded%20to%20a%20central%20location%20(Document%20Library)%3C%2FLI%3E%0A%3CLI%3EDocument%20metadata%20is%20applied%3C%2FLI%3E%0A%3CLI%3EDocument%20is%20moved%20to%20it's%20determined%20target%20location%20based%20on%20the%20metada%20applied%20in%20step%202%3C%2FLI%3E%0A%3CLI%3EAdditional%20metadata%20is%20applied%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EWe've%20decided%20to%20built%20our%20own%20content-organizer%20because%20of%20the%20current%20limitations%20in%20SharePoint%20Online.%20Most%20obvious%3A%20There's%20a%20maximum%20of%203%20days%20documents%20stay%20in%20the%20Drop%20Off%20Library%20before%20they're%20routed%20(The%20Timer%20Job%20in%20SPO%20runs%20once%20every%203%20days).%20Also%2C%20modern%20UI%20is%20not%20available%20%2F%20fully%20working%20for%20Drop%20Off%20library.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOur%20content%20organizer%20logic%20is%20triggered%20by%20a%20Web%20Hook%20on%20the%20document%20library.%20Changes%20are%20then%20queued%20in%20Azure%20storage%20queues%20and%20the%20logic%20to%20move%20documents%20and%20apply%20metadata%20is%20executed%20from%20an%20Azure%20Function%20making%20use%20of%20Office%20Dev%20PnP%20and%20SharePoint%20CSOM%20libraries.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20hosting%20our%20Azure%20Function%20in%20a%20Consumpion%20plan%20we%20have%20limited%20control%20over%20the%20amount%20of%20instances%20our%20function%20is%20ultimately%20running.%20During%20tests%20we%20ran%20into%20throttling%20issues%20that%20didn't%20happen%20when%20our%20code%20was%20executed%20from%20a%20single%26nbsp%3B%20instance%20process%20(console%20application).%20So%20I%20suspect%20multiple%20instances%20of%20this%20Function%20cause%20throttling%20issues%20to%20arise%2C%20at%20least%20quicker...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe've%20followed%20the%20throttling%20prevention%20guidance%20written%20in%20the%20article%20below%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fgeneral-development%2Fhow-to-avoid-getting-throttled-or-blocked-in-sharepoint-online%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fgeneral-development%2Fhow-to-avoid-getting-throttled-or-blocked-in-sharepoint-online%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAre%20Functions%20calling%20CSOM%20hosted%20in%20a%20Consumpion%20plan%20a%20viable%20%2F%20supported%20approach%3F%20Should%20we%20go%20for%20hosting%201%20instance%20in%20a%20more%20traditional%20App%20Service%20plan%3F%20What%20are%20your%20thoughts%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173481%22%20slang%3D%22en-US%22%3ERe%3A%20Another%20Throttling%20question...%20CSOM%20%2F%20Azure%20Functions%20and%20number%20of%20instances%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173481%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F10375%22%20target%3D%22_blank%22%3E%40John%20Sanders%3C%2FA%3E%26nbsp%3Bdo%20you%20have%20a%20answer%20for%20this%20one%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Super Contributor

We're currently in the process of building a solution that's very similar to SharePoint's built-in Content Organizer:

 

  1. Documents are uploaded to a central location (Document Library)
  2. Document metadata is applied
  3. Document is moved to it's determined target location based on the metada applied in step 2
  4. Additional metadata is applied

We've decided to built our own content-organizer because of the current limitations in SharePoint Online. Most obvious: There's a maximum of 3 days documents stay in the Drop Off Library before they're routed (The Timer Job in SPO runs once every 3 days). Also, modern UI is not available / fully working for Drop Off library.

 

Our content organizer logic is triggered by a Web Hook on the document library. Changes are then queued in Azure storage queues and the logic to move documents and apply metadata is executed from an Azure Function making use of Office Dev PnP and SharePoint CSOM libraries. 

 

When hosting our Azure Function in a Consumpion plan we have limited control over the amount of instances our function is ultimately running. During tests we ran into throttling issues that didn't happen when our code was executed from a single  instance process (console application). So I suspect multiple instances of this Function cause throttling issues to arise, at least quicker...

 

We've followed the throttling prevention guidance written in the article below:

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-o...

 

Are Functions calling CSOM hosted in a Consumpion plan a viable / supported approach? Should we go for hosting 1 instance in a more traditional App Service plan? What are your thoughts?

 

 

 

 

 

1 Reply