|
|
|
|
|
by afandian
1518 days ago
|
|
Pardon the ignorance, but is the state of lambda containers considered to be single-threaded? Or can they serve requests in parallel? If I had a Spring Java (well, Kotlin) app that processes stuff off SQS (large startup time but potentially very high parallelism), would you recommend running ECS containers and scale them up based on SQS back-pressure? Or would you package them up as Lambdas with provisioned capacity? Throughput will be fairly consistent (never zero) and occasionally bursty. |
|
"Lambda containers" is a bit of a misnomer, as you can have multiple instances of a function run on the same container, it's just that initial startup time once the container shuts down that is slow (which can be somewhat avoided by a "warming" function set to trigger on a cron).
I would definitely go with containers if your intention is to use Spring. ECS containers can autoscale just the same as lambdas.
There's some work being done to package Java code to run more efficiently in serverless computing environments, but IIRC, it's not there yet.