rust-memcache
rust-memcache copied to clipboard
Support connection pooling within Client
After #97 lands, it'll be nice to have connection pools to prevent threads from connection starvation. Client should support connection pooling behind a feature flag.
Right now, we have r2d2-memcache for this, but it creates Client
instances instead of Connection
objects which is inefficient if Client
contains multiple Connection
s.
I am collaborator of r2d2-memcache, feel free if you willing to modify it.
And for other feature requests, I just have one suggest is that we can learn from https://github.com/mitsuhiko/redis-rs , I think it have more users and have better experimented maitainers.
For now redis-rs have no pooling in client, but seems they had a plan: https://github.com/mitsuhiko/redis-rs/tree/92dcf0820bff731ec48543e8e11854cbf2c55504#basic-operation . So I think we can support this feature. What do you think? @lemutx
I think it's better to export single connection management for users, connection pool customization is required. For current implementation using r2d2 is too limited and cannot even use r2d2's full functionality.