gomemcache icon indicating copy to clipboard operation
gomemcache copied to clipboard

MaxConns parameter?

Open enugentdt opened this issue 5 years ago • 1 comments

Hiya,

I'm using this library for an application that absolutely pounds a memcached server. Something on the order of 8k queries per second is on my dev branch. However, because memcached is limited by default to 1024 simultaneous connections, I keep overrunning that limit.

Would it be worthwhile to add a MaxConns parameter to the Client object? I'm already working on it on my own fork, but if you'd like, when I finish it, I'm happy to PR it back in.

Alternatively, I could also stop trying to kill my memcached server, or maybe not run 8k queries per second. Eh, this is more fun though.

Thanks!

Edit: My changes are done, come take a look: https://github.com/demilletech/gomemcache

enugentdt avatar May 23 '19 18:05 enugentdt

Rather than add new config knobs, I'd rather just fix the implementation to pipeline request/responses onto the existing connections, rather than make so many.

bradfitz avatar Aug 25 '19 02:08 bradfitz