Skip to content

keep-alive connections (feature request?) #44

prettynatty opened this Issue Oct 11, 2010 · 5 comments

3 participants


I have a problem described here:
Couchrest is using rest-client.
It would be great if the library wouldn't create new connection per every request.
So this is possible without using hard socket api. May be it is useful to use Mechanize(without nokogiri) for requests?

REST-Client Team member

From what I read on keep alive, wouldn't reusing the same connection prevent the library to be multithreaded ?


If I correctly understood your question, yes if the library use keep-alive connections it is not thread-safe(without some cheats). But this problem may be solved by reconnecting if socket is closed. Anyway mechanize can do it by itself.
*sorry for my english.

REST-Client Team member

So I think I prefer to keep rest-client simple (mechnize is a big dependency) and thread-safe so to not support keep-alive, but you could perhaps do it with restclient-components


hmm it is good idea.
when I find time I'll implement this in my fork of rest-client-components.

rosscdh commented Feb 11, 2015

@prettynatty +1 for this did you ever get this implemented?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.