santosh kumar patro
santosh kumar patro

Reputation: 8231

Migrate from Azure Function app to Azure Container app

I have asp.net core REST API interacting with Azure Queue with input data. I have a Azure Function App with trigger on Azure Queue service. Whenever any entry that happens at the Azure Queue level, Azure Function app gets triggered which executes certain business functionality and returns the response.

After going the article : https://endjin.com/blog/2022/09/bye-bye-azure-functions-hello-azure-container-apps-part-2-migrating-from-azure-functions-to-asp-net-core , I am planning to migrate the Azure Function app to Azure Container app with gRPC based services.

I tried to explore few details https://learn.microsoft.com/en-us/azure/container-apps/samples but did not come across any good reference.

Here my challenge is how to trigger the gRPC C# services whenever any entry is added to the Azure Service Queue.

Can anyone help me here by providing some guidance?

Upvotes: 1

Views: 1579

Answers (1)

PramodValavala
PramodValavala

Reputation: 6647

Container Apps are built on top of KEDA, so any auto-scalers it supports (storage queues is one of them), you can use to scale your app but you lose bindings when moving away from Azure Functions.

Since bindings are not present anymore, you must use the Azure Storage Queues SDK directly in your code. So, you would call your gRPC service as you dequeue messages.

Container Apps are useful for HTTP triggered functions since you can use HTTP Frameworks like ASP.NET and leverage their complete feature set like built-in authentication, middleware, etc.

For other bindings, unless you have lots of custom code that need to run beyond the limits of Azure Functions or are perhaps trying to convert your existing non-Azure Function app to run serverless, you are likely better off using Azure Functions since most of the service-level binding code is taken care, reducing effort to maintain.

Obviously, if there is no binding support for your auxiliary service like IBM MQ or ActiveMQ, then you would want to use Container Apps instead.

Upvotes: 0

Related Questions