You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for writing this up. I just wanted to clarify few things. I see that a connection is being opened to mongo when every route handle gets called. Is it is how it is working or i am wrong? If i am not wrong, is it effiecent?
The text was updated successfully, but these errors were encountered:
I'm using lazy_static macro. This will initialize it on first use, and only once but there is a lot of way to do this. You can use r2d2 connection pool manager or actix-web web::Data with Mutext and Arc. (but if you use actix-web)
oh Cool! I did saw that but just wanted to clarify. Infact, i looked at r2d2-mongodb repo https://gitlab.com/petoknm/r2d2-mongodb and apparently it is deprecated, recommending to use mongdb crate as its handles connection pool intenrally. Thanks anyway.
Hi,
Thanks for writing this up. I just wanted to clarify few things. I see that a connection is being opened to mongo when every route handle gets called. Is it is how it is working or i am wrong? If i am not wrong, is it effiecent?
The text was updated successfully, but these errors were encountered: