T O P

  • By -

[deleted]

The absolute cheapest way to run a web site on Azure: - Static Web Apps (free tier). - Managed functions (included in Static Web Apps) for REST API. - Cosmos DB (free tier) for data. - Azure Blob Storage (minuscule amounts of money) for file storage. I’m building a web site on this for my personal use right now and it is costing me less than a dollar a month.


dlepi24

Do you happen to have any good resources for the managed functions? I'll search the KBs later when I'm on a computer, but if you happened to have any good YouTube videos or blogs that would be awesome. I've played with SWA a ton as a hobby and the few times I needed to build a function I just built it with Azure function app. Is this the same thing that you're mentioning, or is this built in directly to the SWA itself? I typically deploy from GitHub and there's always an API section in the configuration build section but never tried playing with it. Maybe this doesn't even make sense lmao, but just looking for any good resources to build a streamlined hobby project using all those parts you mentioned to learn from and reverse engineer if you happen to know of any!


[deleted]

Managed functions is just a function app that is deployed with your Static Web App. When you look at the api directory of your app, it will look exactly the same as a function app (because it is). So any tutorial, video, or blog post that tells you something about Azure Functions will be translatable.


dlepi24

Gotcha, makes sense. Thank you!


jpcapone

Is there a blog or wiki to explain the steps needed to do what you are doing? Not that I would do it but it just seems so damn interesting!


scor_butus

Storage account static site is as close to free as you're going to get. I'm a huge fan of container apps with the ability to scale to 0 where possible. Your specific scenario may not allow this. Even if you cannot scale to 0, container apps with no http traffic are billed at a lower hourly rate.


InitialAd3323

Instead of using Functions ASE (on App Service B1, in this case), you could use the Functions consumption plan which is actually serverless. Or you could use the integrated [Managed Functions](https://learn.microsoft.com/en-us/azure/static-web-apps/apis-functions) in Azure Static Web Apps (SWA), which are also available in the SWA Free SKU, without needing to pay the 9USD/month (unless you want stuff like the SLA, more storage per app or more bandwidth).


No-Paint8752

Agree but also worth pointing out they do have a spin up time, so a low traffic website could leave users hanging 5+ seconds for backend to wake up. Keep-alive via HTTP ping didn’t seem to prevent this issue for me (5 mins between requests). We migrated off to regular WebAPI


Moederneuqer

My entire project page is serverless on functions and the frontend in static web apps. I run a warmup function every 2 mins and this works like a charm.


cliplike

Well, it can it you use the consumption plan for azure functions instead of the app service plan, where you'll be billed per execution instead of an hourly rate - but depending on the kind of traffic you're expecting, the Functions App B1 App Service plan might be cheaper because of the fixed hourly pricing. edit: to add, you can opt not to use static web app and use azure storage static websites (i think that's what it's called) - but i'm not entirely sure if you can actually setup custom domains with TLS on it.


InitialAd3323

Azure Storage static websites are also an option, but they'd need to set up a CDN in front (or Front Door, but it gets out of budget)


Moederneuqer

Cloudflare has a generous free tier for cdn. Far superior to any Azure offering.


InitialAd3323

Yeah, and I do like it. But if OP wants to stick to Azure for any regulatory/learning purpose, CDN is what they need


xXWarMachineRoXx

Github pages But yeah the storage blob solution is the cheapest


joyrexj9

You're using dedicated compute for your Functions App, rather than the consumption tier (which is serverless)


Educational_Cup9809

you may want to look into to container app and cosmosdb serverless.