3 ms·
Async is not necessarily as useful for database connections since connection counts will generally be in the 10s and handled with a thread pool. It's pretty low
by redman25 3y ago
Async is not necessarily as useful for database connections since connection counts will generally be in the 10s and handled with a thread pool. It's pretty low overhead to just use pooling.
- unshavedyak 3y agoYea but you still want a good async interface if you're already using async, even if it's mocked over an underlying threadpool. Otherwise you have to wrap all your DB clients in your own adhoc async wrappers which feels kinda bad, imo.
- laurencerowe 3y agoIt’s frustrating there seems to be no good threaded web server for Rust given how uniquely great Rust is at threading. You can adapt from async to sync but there is a definite complexity tax with all the pinning plus the runtime cost of the extra pinning. Async is great for more proxy like use cases though.
- laurencerowe 3y ago*runtime cost of the extra copying.