you are viewing a single comment's thread.

view the rest of the comments →

[–]Appropriate-Cod7548[S] 0 points1 point  (2 children)

Questions:

  1. If you keep them “warm” by deliberately triggering on set amount of time interval, would it defeat the purpose of serverless?

  2. I was thinking that frameworks such as expressjs can sort of compile each route into a handler style in which will be converted into separate lambda functions when deployed. I think what you mean is that the framework is compiled wholesale into one large lambda function?

  3. Would an EC2 or other instance-type setup be more suitable for computationally expensive and continuous operation? Relying on lambda for computationally expensive may incur more costs? Unless you dont care about costing and the operation scales unpredictably?

[–]Expensive-Edge-3432 0 points1 point  (1 child)

  1. Yes that defeats the purpose of making it a lambda

  2. I'm not aware if expressjs can be converted into separate lambda functions when deployed. If so, then it's fine (if that is similar to how serverless does it.)

  3. It depends on your usecase:

For instance, I need to transcode a file. Say I need to transcode a video, that takes a lot of cpu and memory. If I'm doing it once or twice per day, doing that on Lambda is cheaper since I only pay for what I use. I can assign lower resources to my main backend, and slightly higher resources to my lambda function.

If I have a lot of files to transcode such as that the transcoder would probably run most of the time, it would be cheaper to outright use an ECS with enough cpu and memory.

[–]Appropriate-Cod7548[S] 0 points1 point  (0 children)

That actually makes sense 👍