Why did I choose Azure API App over Function App?

This week we decided to create a new isolated mission critical but dead simple and small api in order to publish our web api endpoint address to the mobile clients.

The use-case is very simple: pass platform, version and environment (dev/prod) and receive the api that you need to work with.

Why did we decide that?
This is going to help us seamlessly and gradually shift between old production environment to the new production environment.

Last week I watched a presentation  about Azure Function Apps and kind of fell in love with the concept.

Because of the following advantages I knew right a way that’s the best solution for us in order to implement that single, very small and mission critical api method:

  • next to nothing development time
  • automatic deployment from a git repository
  • use dynamic or classic app service instances
  • cheap
  • reliable

This week while starting to do the design an implementation and after some experiments I decided to go with API Apps instead, because of following reasons:

  • Slots are not yet supported. Slots in my opinion is a very amazing feature that gives you the ability to neatly host production and development next to each other and avoids confusion and clutter of multiple resources. As a work around I could go with two Function Apps; one for prod and the other for dev.
  • No Test in Production. As funny and scary as the title is, that is a must have feature especially in our case, where we want to redirect only part of the traffic to another Slot. You could say that’s not a big deal and just put it behind a Traffic Manager but, read the next point.
  • Not Compatible with Traffic Manager. Basically traffic manager ATM only accepts FQDN however, Function Apps have a full URL and if enabled, an authentication key. But the FQDN of the Function Apps return 404. Whereas Traffic Manager needs the FQDN to return a 200. Therefore, traffic manager will degrade the end point at once. When you try Azure resource instead of external links, it will select the Function Apps but goes into “Checking Endpoint” for ever and finally degrades it. If you call it, your will get a 404.

azure-app-manager

Those are the reasons why I decided to go with API App for now.

I think the Function Apps are still very new and in a real production scenario they should be able to at least support the features mentioned.

 

Leave a Reply

Your email address will not be published. Required fields are marked *