Fork me on GitHub
#sql
<
2019-06-03
>
dangercoder12:06:17

Let's say I have a microservice, which has it's own postgres` database. Why would I want to use pgbouncer before reaching postgres instead of just relying on HikariCP in my application?

dangercoder12:06:20

It would make more sense if I have a big postgres database that a lot of applications connects to. But in this case.. i dont know

dangercoder12:06:20

If using pgbouncer pools are also shared across service-instances but I am still unsure.

kulminaator18:06:38

you might find yourself quickly growing from 1 instance of your microservice to 10 and eventually postgres will run out of connections

kulminaator18:06:51

or you might want to syncrhonous switching of db host from a to b ...

kulminaator18:06:29

but for now i'm actually in your camp, for a big set of services i use direct connection pools instead of pgbouncer on the side ...

Roger Amorin Vieira12:06:45

@seancorfield Its a library that I'm using to simplify the SQL. When I had started with Clojure "jdbc.sql" was the first sql library that I founded. Do you have a better library for that?

seancorfield04:06:25

@U26FJ5FDM no he's asking about a DSL to generate SQL to use with clojure.java.jdbc

seancorfield04:06:32

@UJWU8FW3A use HoneySQL instead of java-jdbc.sql.sql (I think the readme says that?)

seancorfield04:06:28

From the readme "Projects like HoneySQL and SQLingvo are always going to be better DSLs"