Cloud isn’t easy

Putting together a multi-tenant cloud application with dependencies to external services and a Windows desktop application isn’t easy. And the cost-tools provided, well let’s just say they’re not really on the spot. One of our resources was listed as “about $6 per month”, but is actually close to 1000 SEK ($95, give or take) per month.

Well, I don’t think doing what we’re doing here would be easy on premise either. And definitely not cheap. I mean, scale and geo-redundancy on self hosted infrastructure sounds like a nightmare.

I’m learning a lot about cloud, or maybe rather Azure. I’m pretty familiar with the concepts of cloud, but choosing the right resources, and configure them for optimal balance of performance and cost is, well confusing.

We have decided to rebuild the report generator to remove unfortunate dependencies (LibreOffice) (Option C), and while doing that we can also run it as an Azure Function rather than a Windows Container resulting in faster execution time (since the Windows Container takes minutes to instantiate), easier scalability and lower cost.

The scalability is because the Azure Function auto scales by default up to 100 instances, while the default limit on Container App Instances is 10. Also, since execution time is seconds instead of minutes, the need for more simultaneous instances is far lower.

We also decided to implement a Queue (Option B) to handle the limitation on Crawl-Container Instances. Execution time on the crawls are not an issue, they are expected to take a long time. However, with a Container Manager, we can handle scaling at a whole different level, distributing instances across regions if necessary.

About Stefan Bergfeldt

Jag som kallar mig för Ordbajsarn heter egentligen Stefan Bergfeldt. Jag föddes på Falu lasarett i augusti 1978, och är uppväxt i Hedemora. Webbutvecklare, sökmotoroptimerare, entreprenör och gitarrist är andra saker man kan kalla mig, om inte Ordbajsarn passar. Jag driver konsultfirman CRS Webbproduktion, och har specialiserat mig på att ta fram kostnadseffektiva webblösningar till små- och medelstora företag.