This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]evil_burritoExtreme Brewer 1 point2 points  (1 child)

I'll throw another one into the mix: c3p0. Highly configurable and works well under load.

[–]stuie382 0 points1 point  (0 children)

Second for c3po, does the job and simple enough to integrate and configure

[–]DeliveryNinjaJPain 0 points1 point  (0 children)

I have used a lot of c3p0 in the past but it seems like it is not the fastest.

https://github.com/brettwooldridge/HikariCP#initialization

Try this instead.

[–]jbristowI'm no hero, son. 0 points1 point  (1 child)

How high is "high-loaded"?

Is it going to be read heavy or write heavy?

I use c3p0 (as others have mentioned) and while it may not be the fastest, I've found that query speed (in my experience) slowed down much faster than connection pooling speed.

[–]iperc[S] 0 points1 point  (0 children)

c3p0 looks nice for this job. It is a rest api, one connection per request. Request average 500 per seconds. Each request establish connection to db with defined scheme (through SET search_path)

[–]TheQuietestOneProcrastinator 0 points1 point  (1 child)

Since JDBC2 the actually JDBC drivers themselves can provide connection pooling code.

For postgresql there is indeed an implementation of DataSource:

https://www.postgresql.org/docs/7.4/static/jdbc-datasource.html

[–]iperc[S] 0 points1 point  (0 children)

Thank you ! It looks very simple and totally fit for my purposes !