Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
281 views
in Technique[技术] by (71.8m points)

node.js - Is server side pooling necessary for Sequlize pool to work?

I have a nodejs application and I am using sequelize as ORM with Postgres. As explained in documentation of sequelize, here is my code for pooling.

const sequelize = new Sequelize(/* ... */, {
  // ...
  pool: {
    max: 10,
    min: 0,
    acquire: 30000,
    idle: 10000
  }
});

Since Postgres doesn’t have inbuilt pooling (AFAIK), Do I need to install and configure something like pgbouncer, on my server to make pooling work?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

No. Having multiple levels of pooling rarely makes sense, and you can certainly have a client-side pool without a server-side one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...