0
votes

**Background: **I currently have a web app that relies on a monolith azure api app. The web app is deployed as a static site using Azure Storage. The API is deployed as an Azure API app.

I am starting a port of the application to go from .net 4.6 to .net core 3.1 and was considering different options for architecture. I was initally thinking of breaking the monolith API up into about 5 different Azure API apps (different apis based on logical groupings of functionality in the system) that sit behind an Azure API Management. But the costs of a sample that I put up were pretty crazy with little to no actual traffic coming through.

Now I'm considering replacing those Azure API apps with Azure functions which, I THINK, would resolve the issue of cost during development and also would be a quality production solution with less maintenance and a just as easy fit in the CI/CD pipe.

I couldnt find any documentation on anything that truly distinguishes Azure API apps from Azure Functions (with an HTTP Trigger).

I currently have an authorization server written with identity server 4 as an API app and the other apis authenticate against it. Can I do the same with Azure Functions? Are there any gotchas that I am missing?

1

1 Answers

0
votes

Migrating to Azure Functions on a consumption-based plan would certainly solve the $$$ issues because you'll pay for when Functions are invoked, not for the running time when they aren't in effect - effectively you'd be using an event driven model for execution.

There are some key difference when running applications in a server less model like Azure Functions that you'll need to be aware of.

Key things you'll want to keep an eye on are things like

  • Long running transactions (Azure Functions is likely NOT the best scenario for this - though Durable Functions could be)
  • Cold start times can be problematic with Serverless solutions - there are solutions to solve this for you as well (see Functions Premium Plan)

From what you've described it sounds at though you've already decomposed your API's properly, so best guess without seeing more of your solution is Functions is likely to be a better fit for what you're doing.

HTH