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.
If you find the post has answered your issue, then please mark post as 'answered'.
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.
cloud lock-in. You need to port to change cloud vendors
startup cost (not always running)
limited language support
may be difficult to include third party libraries
the upsides:
cheap & lightweight
easy scaling
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.
Member
112 Points
112 Posts
Choosing Azure Function over Web Api
Mar 05, 2020 12:35 PM|dbqasp|LINK
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.
Contributor
4933 Points
4205 Posts
Re: Choosing Azure Function over Web Api
Mar 05, 2020 01:38 PM|DA924|LINK
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.
All-Star
58174 Points
15655 Posts
Re: Choosing Azure Function over Web Api
Mar 05, 2020 04:35 PM|bruce (sqlwork.com)|LINK
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.
the upsides:
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.