adamskibicki / Progress.API

Web api for app that allows user to track progress of virtual fantasy character - based on Azarinth Healer novel (https://www.royalroad.com/fiction/16946/azarinth-healer). You can also support the author here: https://www.patreon.com/RhaegarRRL.
MIT License
0 stars 0 forks source link

Validate if using Azure Container Apps is viable option for deployment #27

Closed adamskibicki closed 1 year ago

adamskibicki commented 1 year ago

ACI uses container group to specify needed resources, this resources are shared between containers created in it. I know how much i will pay per month (around 30-40 dollars with 1 vCPU and 2GB+ memory needed mainly for sql server). Azure file share can be used as permanent storage for sql server (better than consumption model), eventually azure sql with low sku.

Container Apps - containers in pay as you go model on top of managed k8s, payment is for resources (vcpu, memory) per second. It will be much cheaper, but more dangerous if something goes wrong (ddos attack - very unlikely). Need checking if it is possible to turn off app when not needed so it can't be used in that time for cost security reasons.

there is also an option of free tier web app for containers (with selected sql model) fully free, with azure sql low sku - i know this resource types the best. In case of using azure sql in consumption model i can simply turn off web app when not needed (maybe db too). i also know that this solution will provide everything i need for my apps.

Using docker containers gives me option to change later.

What i don't know: Does ACI have all features i need? - features i need are simple now. I don't know if i will need something else later. Container Apps cost dangers management?- low knowledge about it. Need checking if costs dangers can be avoided. web app for containers with azure sql - good knowledge, known features, probably won't need more even in the future. Need checking azure sql skus, and if consumption model costs can be controlled in an easy way.

adamskibicki commented 1 year ago

For now Web App for COntainers with Azure SQL seems the best solution - cheap, hybrid of both ACI and Container Apps in case of costs. For SQL i can use Basic SKU (5$ per month) - cheap, no danger of extra costs like in consumption models. If needed both web app and sql can be easily scaled.

adamskibicki commented 1 year ago

Container Apps - it's similar to AKS in features, but here we don't have to manage AKS itself, we have everything ready and built on top of it. For now not needed, i need something simple. If everything is in containers, then moving to it from web apps, even if sql is left as azure sql, will be easy.

adamskibicki commented 1 year ago

Container Apps costs management - i can set min and max number of replicas per app. I can also set resources allocated per replica when it is running. if not used it can scale down to zero - no costs. there are also subscription level free seconds of memory and vcpu and requests that can be easily used to have no costs.

Why using it can be a good idea: