Fork me on GitHub
#aws
<
2015-11-21
>
bplatz13:11:03

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

martinklepsch13:11:15

(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

bplatz14:11:44

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.

bplatz14:11:48

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

bplatz14:11:29

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

s/running/starting/

alandipert15:11:09

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

alandipert15:11:36

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

alandipert15:11:00

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?

alandipert15:11:35

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

alandipert15:11:25

the other use case is collecting metrics from s3 for monitoring, i made a thing to generate those - https://github.com/adzerk-oss/S3DatadogLambda

Kira Sotnikov15:11:46

You use datadog! simple_smile

ragge15:11:53

@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...

ragge15:11:44

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

jaen16:11:07

@lowl4tency: you can use Clojurescript to compile node code and some people seem to use that with lambda - https://github.com/nervous-systems/cljs-lambda

Kira Sotnikov16:11:42

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

jaen16:11:41

Ah, sorry, I misunderstood what you said then

Kira Sotnikov16:11:57

what benefits are there to use cljs instead clojure? simple_smile

jaen16:11:47

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

ragge18:11:57

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)