3 ms·
For running Java in Lambda, I had to optimize it for Lambda. To decrease processing time (and in the end the bill), I got rid of all reflection for example and
by Jdam 9y ago
For running Java in Lambda, I had to optimize it for Lambda. To decrease processing time (and in the end the bill), I got rid of all reflection for example and though twice when to initialize what and what to make static. Also, Java Cold Start is an issue. I fixed this with creating a Cloudwatch Trigger that executes the Lambda function every minute to keep it hot. Otherwise, after some minutes of no-one calling the function, it takes 10+ seconds to respond. But if you use Python for example, you don't run into this issue.
I built complete backends on top of Lambda/API Gateway/Dynamo and having "NoOps" that also runs very cheap is a killer argument for me.
- jk563 9y agoThe polling trigger is a fairly common pattern from what I've seen to keep it hot.
- bfred_it 9y agoI feel that they could just charge you to keep a minimum of available instances up. How much does it cost to receive 3600x24x31 calls per month? I'd start from that.
- iagooar 9y agoSeems like a lot of hustle to me...
- manishsharan 9y agoIf you are triggering it every minute, may I ask how much you are paying for it per month . I have though about it as well as I have a java + spring + Hibernate which takes much too long to start up ; in fact the task execution time is less than the cold start time in my case.
- Jdam 9y agoExecution takes less than 100ms and I never exhausted my monthly free quota on Lambda, so I can't say.