bhanuc / nanonets

Demo API server
0 stars 0 forks source link

Connection pool for rethinkdb #2

Open prats226 opened 6 years ago

prats226 commented 6 years ago

https://github.com/bhanuc/nanonets/blob/aa65fe63b15a697a218bf63b6419be28e7952dae/app/app.js#L32

Since you are passing database connection in context of request, is the connection thread safe?

bhanuc commented 6 years ago

Well I had assumed that pooling was enabled by default in the driver but a little digging revealed that it wasn't the case. Switched to a driver with pooling support with minimal change.