Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

mongodb - 了解猫鼬池(Understanding mongoose pooling)

in mongoose when creating a connection, and setting poolSize option to say 10, does that mean we create 10 connections with this operation that will be handled my mongoose ?

(创建连接时,将poolSize选项设置为10,这是否意味着我们将使用此操作创建10个连接来处理我的猫鼬?)

or how it works exactly ?

(或者它是如何工作的?)

// With object options
mongoose.connect('mongodb://localhost:27017/myapp', {poolSize:10});

does executing the above code, means that we now have 10 connections that we can access using mongoose variable ?

(执行上面的代码是否意味着我们现在有10个可使用mongoose变量访问的连接?)

or how does it work exactly ?

(或它究竟如何工作?)

  ask by Amr Mohammed translate from so

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

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...