Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

552
Views
AZURE REST API - Fast API as Azure App Service or Azure Function App with Http triggered functions as endpoints?

I am debating what is the more "correct" / better performance solution to implementing a REST API on Azure that has a basic CRUD to a database:

  1. Create a Fast API app and deploy it simply on an Azure App Service
  2. Create an Azure Function App that every endpoint is represented by an Azure Http trigger function (inside of the azure function app) - the code in the function will be the basic CRUD functionality of the endpoint written in python (has nothing to do with fast api - basically only uses the pure code that would be inside a FastAPI route).

Both eventually would be wrapped with Azure API Manager.

What solution will have better response time?

Will server-less be more resilient?

Thanks

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

If the functions use the python runtime, then FastAPI is a very popular alternative.

I personally found the migration of Azure Functions to a FastAPI App Service to be very smooth and hassle-free.

Differences between the above two:

  • Function Independent Changes: Primarily we need to import FastAPI and Status, CORS Middleware in the include statements to avoid CORS issues.
  • In the Azure functions, CORS will be enabled through the portal.

For getting the more information about the differences like Function dependent changes, Return Statements, adding more than one function/endpoint, please visit this article.

FastAPI ranks among the highest-performing Python web frameworks for building APIs out there and it's being used more and more day by day.

Not only in terms of the number of queries handled per second, but also the speed of the development and its built-in data validation makes an ideal for the backend side.

over 4 years ago · Santiago Trujillo Report

0

A few other aspects which you need to think about like scalability, cost and ease of development.

  • If you use Fastapi on an app service, you will need to configure the scaling rules yourself. An azure function on consumption or premium plans will scale automatically.
  • Fastapi on an app service will cost money even if you are not using it. But an azure function on consumption plan will cost only if you use it and you get 1 million executions free every month so the cost is basically nothing if your execution count is < 1M.
  • Since FastAPI is an API framework, it comes in built will correct
    responses in case of errors and you just handle whatever you need to. For Azure function you will need to code pretty much everything.
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!