I found a solution
Azure Container Apps not scaling as expected
Hi team Microsoft,
I'm trying to get my FastAPI app to scale with Azure Container Apps but can't seems to get it working as wanted. I expect the container app to scale horizontally for every request, but truth is when I send concurrent requests, it would be one replica taking all requests at a time, which I think later caused Critical error because the worker taking too long to response.
[CRITICAL] WORKER TIMEOUT (pid:10) [ERROR] Worker (pid:10) was sent code 134!
For reference, my azure container app would take a request from client, response instantly with a webhook and do some cpu-bound tasks (chunking, embedding texts) with FastAPI's background tasks.
Questions:
- How do I make scaling work here? the Concurrent requests param doesn't seem to work
- Would Azure queue storage work in this case?
My scaling rule: