App Runner Scaling for background service

1

We have started using App Runner to run out container based application. Some of the services are just background jobs meaning there will be no incoming requests to those services specifically.

According to the information on how App Runner scales I read this:

AWS App Runner monitors the number of concurrent requests sent to your application and automatically adds additional instances based on request volume. If your application receives no incoming requests, App Runner will scale the containers down to a provisioned instance, a cpu throttled instance ready that is ready to serve incoming requests within milliseconds.

I understand that with the background process auto scaling will probably not work but we are ok with setting a minimum manually so that we have enough instances. What worries me though is the part that says a "cpu throttled instance". My question is:

  1. Does the fact that the instance get CPU throttled mean that I will not get proper instances and App Runner is not capable of running a service that does not serve http requests?
  2. Assuming question 1 is that the instances will work fine and not be throttled, is there an actual way to get auto scaling on such a service?
Jumaru
asked 2 years ago2204 views
3 Answers
1

Yes your understanding is correct (and we should probably make it more clear in the docs). App Runner is optimized for request/response application (e.g. web servers, api services). We do indeed throttle CPU when no inbound requests are detected (and hence not served). App Runner would not be ideal (at least for now) to run worker type of processes. For that use case, if you are looking at something as simple as App Runner, the closest would be Copilot. Note Copilot is a multi-function CLI that allows you to deploy to App Runner as well as to ECS/Fargate via a set of built-in services patterns which includes web and worker services. The main difference between deploying to App Runner Vs ECS/Fargate is that in the latter case the resources (tasks, LBs, etc) are deployed in your account (whereas in AppRunner all the building blocks are deployed in an AWS account).

We are looking at expanding the type of workloads that App Runner can support in the future.

HTH

AWS
EXPERT
answered 2 years ago
  • Thanks for the response. It is a bit disappointing that this is the case since I really liked the simplicity of App Runner. If there was at least the option to prevent the throttling that would at least allow for customers to run a worker service even if they did not get any auto-scaling with it. I'll take a look at these other services that you mention to do what I need.

  • I hear your disappointment. Would you mind opening an issue on the public App Runner roadmap about this feature? Thanks!

0

Hi @mreferre, Do you have any updates perhaps on the possibility of running worker processes op Apprunner?

answered 2 years ago
0

Hi

We are currently setting up various services with AppRunner. We also need some workers for scheduled tasks and queues. These are not started via incoming requests, but via a scheduler that runs within the application.

Are there any best practices or AppRunner functions for this? Or is another tool more suitable for these tasks? Ideally, we can still use our application, as it already contains all the logic.

Thank you and best regards

Fabian
answered 7 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions