Re:Serverless dev practices questions
by parzivalm on Wednesday September 06, 2017 @10:15AM
(#15183828)
Have you thought about the added execution time from JVM startup? A project I had dropped in my lap awhile ago was figuring out a way to speed up a java lambda function. Basically we decided the only way was to try and make the lambda container always hot. A cloudwatch event would trigger the lambda function every 5 minutes to make sure it was always hot.
Re:Serverless dev practices questions
by mseebach on Wednesday September 06, 2017 @10:48AM
(#15184094)
For now, my project isn't very sensitive to taking a couple-of-seconds warm-up hit. But I'm aware of the issue, and it seems that keeping your classpath lean works wonders. I'll be investigating further, but my tentative plan is to section the endpoints by their dependency-size. The majority of the enduser-latency-sensitive endpoints will need little more than a JDBC connector.
This would also maintain as loose as possible coupling to the Lambda ecosystem, making porting easy -- I'm in Java-land, so that probably means Dropwizard. I'm not there yet, but I'm planning to maintain a parallel Dropwizard wrapper, to make local dev easy.