This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-21
Channels
- # admin-announcements (14)
- # aws (27)
- # beginners (10)
- # boot (152)
- # cljsrn (3)
- # clojure (93)
- # clojure-hk (4)
- # clojure-russia (35)
- # clojure-switzerland (1)
- # clojurecup (1)
- # clojurescript (146)
- # core-async (23)
- # cursive (2)
- # devcards (1)
- # editors (1)
- # hoplon (28)
- # jobs-rus (4)
- # ldnclj (3)
- # leiningen (3)
- # luminus (2)
- # off-topic (4)
- # om (174)
- # re-frame (1)
- # slack-help (5)
Are you using clojure or clojurescript for lambda? What has been your experience with startup latency?
(Thats a +1 as in "interesting question" :)
bplatz: I'm using clojure, i'm not sure lambda has ability to run cljs
only if cljs has ability to generate nodejs code
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.
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
cloudwatch doesn't have running time metrics by default 😞
s/running/starting/
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
agreed, it's very quick. And interesting issue for test
but it's still too slow for us, we call the function a lot
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 - https://github.com/adzerk-oss/S3DatadogLambda
uh, cool
You use datadog!
@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 - https://github.com/nervous-systems/cljs-lambda
jaen: yes, it exactly what i said early. Thanks for the link
what benefits are there to use cljs instead clojure?