This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-20
Channels
- # babashka (56)
- # beginners (151)
- # calva (3)
- # cider (31)
- # clj-kondo (17)
- # cljs-dev (5)
- # clojure (26)
- # clojure-australia (21)
- # clojure-dev (7)
- # clojure-europe (23)
- # clojure-nl (5)
- # clojure-spec (54)
- # clojure-uk (11)
- # clojuredesign-podcast (8)
- # clojurescript (77)
- # community-development (10)
- # core-typed (1)
- # cursive (3)
- # datomic (7)
- # docker (67)
- # emacs (10)
- # expound (6)
- # figwheel-main (3)
- # graalvm (67)
- # helix (10)
- # java (13)
- # jobs (6)
- # kaocha (4)
- # leiningen (15)
- # malli (2)
- # meander (31)
- # off-topic (40)
- # pedestal (9)
- # rdf (7)
- # reagent (5)
- # reitit (9)
- # remote-jobs (5)
- # shadow-cljs (94)
- # sql (7)
- # testing (12)
- # tools-deps (75)
- # vim (13)
I'm looking to hook up AWS Lambdas with postgres, and I was wondering if it makes any sense to use connection pooling (e.g: hikariCP
) in this context? Lambda has only one thread, so I don't see how having more than one connection can make a difference. The best approach I can think of now is just having one connection open for the duration of the Lambda (with jdbc/get-connection
).
Lambdas can have several threads. So connection pooling might be useful in some cases. But in most cases having a single thread with a single connection is probably good enough.
There is also this: https://aws.amazon.com/rds/proxy/ A connection that can be shared by several lambda instances.
Thanks for the confirmation! Oh, what I meant is CPUs, not threads. Running code in parallel. I read somewhere that CPU usage is bound to the amount of memory you assign to the lambda, but I don't know about the specifics. Like, maybe you get 2 CPUs if you set 2GB+ of RAM, or something like that.