title: Net::HTTP Start vs New
body: <p>Ruby Version: 1.9.3</p>
  
  <p><a href="http://ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net.html" rel="noreferrer">http://ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net.html</a>
  The documentation states that "If you wish to re-use a connection across multiple HTTP requests without automatically closing it you can use ::new instead of ::start"</p>
  
  <p><a href="http://ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net/HTTP.html#method-c-new" rel="noreferrer">http://ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net/HTTP.html#method-c-new</a>
  This documentation states that "Creates a new Net::HTTP object without opening a TCP connection or HTTP session. " </p>
  
  <p>Scenario:</p>
  
  <p>My aim is use re-use HTTP and TCP connections as much as possible. If i am using Net::HTTP.start as my HTTP object, and if there is a significant delay between two successive calls ( > 2 minutes), the first call after the delay is failing with EOFError : end of file reached.</p>
  
  <p>So, I am planning to swap Net::HTTP.start with Net::HTTP.new</p>
  
  <p>Questions:</p>
  
  <p>If i use new instead of start, will new re-use connections? or will it try to create a new HTTP and TCP connection everytime a HTTP call is made?</p>
  
  <p>Will there be a performance impact because of this?
  What is the best way to handle in scenarios like these, where we want to make HTTP calls in a high volume traffic?</p>