This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-03
Channels
- # adventofcode (2)
- # announcements (1)
- # asami (35)
- # babashka (67)
- # beginners (97)
- # cherry (3)
- # clj-yaml (3)
- # cljsrn (9)
- # clojure (44)
- # clojure-dev (34)
- # clojure-europe (13)
- # clojure-gamedev (1)
- # clojure-norway (10)
- # clojure-uk (2)
- # clojurescript (24)
- # clr (1)
- # conjure (18)
- # cursive (4)
- # datalevin (3)
- # emacs (6)
- # graalvm (9)
- # graphql (1)
- # introduce-yourself (1)
- # malli (7)
- # nrepl (3)
- # portal (1)
- # quil (2)
- # reagent (1)
- # reitit (21)
- # releases (1)
- # reveal (11)
- # ring (2)
- # shadow-cljs (17)
- # sql (24)
- # vim (4)
Does anyone run on aurora? How do you teach your connection-pool about autoscale events?
i hadn’t thought about that, no. are you thinking you want to resize your pool dynamically?
at least with hikari im not sure how much on-the-fly reconfiguration is even possible without stopping and then creating a new pool
Well the problem I’ve seen is that you can have a handle to a connection that you think is a primary but it gets “demoted” to replica on autoscale events. In these cases, it is sometimes necessary to basically reacquire a fresh connection. It is the reason for this existing: https://github.com/FundingCircle/pg_failover
I saw it in two jobs now (out of two I’ve had exposure to aurora) and figured it must be something everyone who uses it needs to solve but maybe that’s jumping the gun 🙂
hm no it’s interesting and i’m glad you brought it up. i am building against an aurora pg db and i don’t think anyone has considered this/we haven’t run into autoscale issues that changed the primary
as in, if you point at a hostname which always refers to the primary, then maybe you could just get away with low TTL?
for some reason i remember in a past gig we were on aurora and we hit recovery mode, but i don’t recall if we switched DNS for the primary or if it just… was broken for a bit
though i do note that the second to the last post says “we have a ttl of 30sec”…“it takes about 1 minute for the connection to recover”
with a pool size of 100, depending on how they’re testing, that could be about right, but it would also depend on the default hikari opts, which i don’t know all of off the top of my head