locked
Choosing Azure Function over Web Api RRS feed

  • Question

  • User1396448631 posted

    Hi,

    I am new to Azure. Yesterday I watched a video on Azure Function (Http Trigger) and really liked it.

    So what I understood is that Azure Functions only run when requested and so pricing wise they will be cheaper than a Web Api.

    But is cost the only factor when choosing Azure function over Web Api?

    Can you please give me few scenarios other than pricing model, when we would choose one over another.

    Thank you.

    Thursday, March 5, 2020 12:35 PM

Answers

  • User-474980206 posted

    Azure functions or AWS lambdas are known as server-less functions. They are the cheapest and simplest deployment units.

    They have a couple of downsides.

    1. cloud lock-in. You need to port to change cloud vendors
    2. startup cost (not always running)
    3. limited language support
    4. may be difficult to include third party libraries

    the upsides:

    1. cheap & lightweight
    2. easy scaling
    3. no boilerplate. just the code not a whole webapi project to define an action.

    the capabilities are always changing. Most vendors have converted server-less functions to be docker images under the covers. this makes building complex functions easier. 

    note: as most cloud vendors support using cloud storage to host static content (no web server required), progressive apps can be built and deployed without any web servers. this is a growing trend.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 5, 2020 4:35 PM

All replies

  • User1120430333 posted

    Azure is a hosting platform. WebAPI is a restful Web  service project that can be implement in a .NET solution. I don't see how you are making this comparison between them.

    Thursday, March 5, 2020 1:38 PM
  • User-474980206 posted

    Azure functions or AWS lambdas are known as server-less functions. They are the cheapest and simplest deployment units.

    They have a couple of downsides.

    1. cloud lock-in. You need to port to change cloud vendors
    2. startup cost (not always running)
    3. limited language support
    4. may be difficult to include third party libraries

    the upsides:

    1. cheap & lightweight
    2. easy scaling
    3. no boilerplate. just the code not a whole webapi project to define an action.

    the capabilities are always changing. Most vendors have converted server-less functions to be docker images under the covers. this makes building complex functions easier. 

    note: as most cloud vendors support using cloud storage to host static content (no web server required), progressive apps can be built and deployed without any web servers. this is a growing trend.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 5, 2020 4:35 PM