jeudi 17 décembre 2015

How rails database connection pool works

I am learning rails database connection pool concept. in rails application i have defined pool size of 5.

my understanding about connection pool size is as below.

1)when server start rails automatically creates n number of connection defined in the database.yml file. in my case it will create 5 connection since pool size is 5.

2)on every http request if there is need to access database then rails will use available connection from the connection pool to serve the request.

But my question is if i hit 1000 request at a time then most of the request will not get access to database connection because my connection pool size is only 5.

Is my above understanding about rails connection pool is right??

Thanks,

Aucun commentaire:

Enregistrer un commentaire