I'm currently running a Python FastAPI backend on a Linux virtual machine, which is also hosting an SQL database. I have an HTML frontend that I'm thinking of hosting in Static Web Apps. The issue I'm facing is the cost of using API Management; it's around $700 with Virtual Network integration. I'm trying to find a more affordable way to set up my infrastructure without compromising the backend being on the VM. What are some alternatives or strategies I can use?
3 Answers
Honestly, APIM seems like overkill for what you're trying to achieve. It's mainly for larger projects with lots of APIs or enterprise needs. For a single application, it's just unnecessary.
Have you considered exposing your backend directly using HTTPS and setting up NGINX on your VM? You could also look into using an application gateway as another option.
Instead of using APIM, I recommend looking into reverse proxies like NGINX or Caddy. You can host it on the same VM, which can simplify routing traffic to your backend effectively. It can be set up to handle HTTPS from your static web app and then route traffic internally to your backend.

Exactly, does APIM really suit your project? Are you working on something large-scale or is it more of a side project?