Fork me on GitHub

Are you using clojure or clojurescript for lambda? What has been your experience with startup latency?


(Thats a +1 as in "interesting question" :)

Kira Sotnikov13:11:40

bplatz: I'm using clojure, i'm not sure lambda has ability to run cljs

Kira Sotnikov13:11:05

only if cljs has ability to generate nodejs code simple_smile


I've heard the node.js response time is quite good, and seen a blog or something about some trial with cljs -> node.js on lambda.


I had also seen someone talk about using .clj, and sounded like a ~7s startup time... fine for batch stuff but nothing real-time.


I've been thinking about trying an experiment with Docker running .clj, and using the experimental checkpoint/restore capability. Basically warm booting the docker instance, checkpoint it, and then restore on-demand. I'm thinking that has the potential of getting to < 1s response times. Not lambda, but you could use a custom scheduler with Amazon ECS.

Kira Sotnikov14:11:11

Honestly, I didn't get any metrics about running time, but in my feelings it's pretty quick. And my app is not critical to start time

Kira Sotnikov15:11:23

cloudwatch doesn't have running time metrics by default 😞

Kira Sotnikov15:11:38



we tested a lambada-based clj function and i was surprised at how quick the startup was, it was definitely < 1 s. one thing we learned is that the memory setting is also the CPU setting


so the amt of memory you allocated makes a big difference in speed

Kira Sotnikov15:11:37

agreed, it's very quick. And interesting issue for test


but it's still too slow for us, we call the function a lot

Kira Sotnikov15:11:15

alandipert: what use cases do you have?


the main one is consumign from kinesis, doing some light processing, and putting records on s3


the other use case is collecting metrics from s3 for monitoring, i made a thing to generate those -

Kira Sotnikov15:11:46

You use datadog! simple_smile


@raywillig: Let me know if you have any feedback/issues with lambada, I'm the author. Mainly wrote it to get around the classloading issue I found, otherwise I wouldn't have made it into library...


when I tested lambada, startup time was a bit slow for first request (but still <1s) then in the milliseconds, so I think aws is using the same instance for multiple requests


@lowl4tency: you can use Clojurescript to compile node code and some people seem to use that with lambda -

Kira Sotnikov16:11:42

jaen: yes, it exactly what i said early. Thanks for the link


Ah, sorry, I misunderstood what you said then

Kira Sotnikov16:11:57

what benefits are there to use cljs instead clojure? simple_smile


I imagine it would be of benefit when having low start-up time is of importance.


see my reply above, I don't think startup time is a problem even with clojure (unless you only invoke your function rarely, but require low startup time each invocation)