Rails: Does every http request creates a new conne

2019-05-06 11:51发布

i am reading this article https://polycrystal.org/posts/2012-05-25-active-record-connection-pool-fairness.html and it states that every http reuest create a new connection pool. is it true??

If it is true then what if a http request creates two threads that needs to access database then will that two threads create two separate connection pool agian or they will use the connection pool created by a http request.

Thanks,

1条回答
forever°为你锁心
2楼-- · 2019-05-06 12:26

Not request, but every worker process. The whole concept of connection pooling is to eliminate the need for establishing a db connection in every request.

查看更多
登录 后发表回答