Re:MongoDB singleton connection in Node.Js
by latchkey on Friday April 05, 2013 @01:17PM
(#5499684)
Even if you use mongoose, you still need to make sure that a connection is successfully made to the database before you try to start using it. This is a blocking operation. The problem is that by default some node libraries (cough redis cough) will cache requests in memory and execute them once the connection is made. This is terrible because if node dies (for example, if mongo fails to connect), all that data is dead.
[ Parent
| on HN ]
There are no comments on this comment yet.