Hello
@Gnanasekar - Power Pages Server Logic should be used for CRUD (Create, Read, Update, Delete) operations, triggering a custom action, Custom API, etc., but not for bulk operations such as processing ~5,000 rows.
Your request through Server Logic might time out after 120 seconds, requiring you to run the API request again. This is neither an ideal nor a recommended approach.
The approach I would recommend, and one I have recently implemented, is to use Azure Functions. Based on your logic, you can send the request from Power Pages Server Logic to an Azure Function and let the Azure Function handle the actual processing. Even with Azure Functions, service requests might occasionally time out or get throttled, but you have more flexibility to implement retry mechanisms and handle failures properly. This would be much harder to manage directly within Server Logic.
So, my recommendation would be to use Power Pages Server Logic along with Azure Functions.
Alternatively, you can use Power Pages Server Logic with Power Automate flows, where the flow has an HTTP trigger. I would recommend this option if you want to avoid the additional development involved with Azure Functions. Power Automate can also handle retries automatically, making it a simpler option for this scenario.