ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:67206] [ruby-trunk - Feature #10674] [Open] Net::HTTP retries idempotent requests once after a timeout, but its not configurable
       [not found] <redmine.issue-10674.20141229151053@ruby-lang.org>
@ 2014-12-29 15:10 ` jeremy.lecour
  2015-11-20 21:42 ` [ruby-core:71614] [Ruby trunk - Feature #10674] " garett.shulman
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: jeremy.lecour @ 2014-12-29 15:10 UTC (permalink / raw)
  To: ruby-core

Issue #10674 has been reported by Jérémy Lecour.

----------------------------------------
Feature #10674: Net::HTTP retries idempotent requests once after a timeout, but its not configurable
https://bugs.ruby-lang.org/issues/10674

* Author: Jérémy Lecour
* Status: Open
* Priority: Normal
* Assignee: Eric Hodel
* Category: 
* Target version: 
----------------------------------------
Hi,

I've noticed that Net::HTTP retries idempotent requests once after a time-out. It seems to adhere to the RFC 2616 (http://tools.ietf.org/html/rfc2616), but it is not always the best thing to do.

When you don't know exactly how a remote web service works, it may be wise to retry after a time-out.
But when you know that a retry won't change anything, it should be possible to disable this automatic retry. Otherwise, the server will have to deal with 2 requests (instead of 1) and the client will effectively time-out twice later than expected (time for the first and second time-out).

Having a basic "#retry=" (like we have "#read_timeout=" or "#open_timeout" would be good first step.
The value could be a simple boolean, or even an integer for the maximum number of retries.

The "Retry" middleware in Faraday has a more comprehensive feature set with max retries, exponential back-off, … : https://github.com/lostisland/faraday/blob/master/lib/faraday/request/retry.rb



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:71614] [Ruby trunk - Feature #10674] Net::HTTP retries idempotent requests once after a timeout, but its not configurable
       [not found] <redmine.issue-10674.20141229151053@ruby-lang.org>
  2014-12-29 15:10 ` [ruby-core:67206] [ruby-trunk - Feature #10674] [Open] Net::HTTP retries idempotent requests once after a timeout, but its not configurable jeremy.lecour
@ 2015-11-20 21:42 ` garett.shulman
  2017-05-14 11:51 ` [ruby-core:81154] [Ruby trunk Feature#10674] " cben
  2017-07-14  8:51 ` [ruby-core:82059] [Ruby trunk Feature#10674][Assigned] " naruse
  3 siblings, 0 replies; 4+ messages in thread
From: garett.shulman @ 2015-11-20 21:42 UTC (permalink / raw)
  To: ruby-core

Issue #10674 has been updated by Garett Shulman.


I can confirm this exact behavior on 2.1.7

----------------------------------------
Feature #10674: Net::HTTP retries idempotent requests once after a timeout, but its not configurable
https://bugs.ruby-lang.org/issues/10674#change-55015

* Author: Jérémy Lecour
* Status: Open
* Priority: Normal
* Assignee: Eric Hodel
----------------------------------------
Hi,

I've noticed that Net::HTTP retries idempotent requests once after a time-out. It seems to adhere to the RFC 2616 (http://tools.ietf.org/html/rfc2616), but it is not always the best thing to do.

When you don't know exactly how a remote web service works, it may be wise to retry after a time-out.
But when you know that a retry won't change anything, it should be possible to disable this automatic retry. Otherwise, the server will have to deal with 2 requests (instead of 1) and the client will effectively time-out twice later than expected (time for the first and second time-out).

Having a basic "#retry=" (like we have "#read_timeout=" or "#open_timeout" would be good first step.
The value could be a simple boolean, or even an integer for the maximum number of retries.

The "Retry" middleware in Faraday has a more comprehensive feature set with max retries, exponential back-off, … : https://github.com/lostisland/faraday/blob/master/lib/faraday/request/retry.rb



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:81154] [Ruby trunk Feature#10674] Net::HTTP retries idempotent requests once after a timeout, but its not configurable
       [not found] <redmine.issue-10674.20141229151053@ruby-lang.org>
  2014-12-29 15:10 ` [ruby-core:67206] [ruby-trunk - Feature #10674] [Open] Net::HTTP retries idempotent requests once after a timeout, but its not configurable jeremy.lecour
  2015-11-20 21:42 ` [ruby-core:71614] [Ruby trunk - Feature #10674] " garett.shulman
@ 2017-05-14 11:51 ` cben
  2017-07-14  8:51 ` [ruby-core:82059] [Ruby trunk Feature#10674][Assigned] " naruse
  3 siblings, 0 replies; 4+ messages in thread
From: cben @ 2017-05-14 11:51 UTC (permalink / raw)
  To: ruby-core

Issue #10674 has been updated by cben (Beni Cherniavsky-Paskin).


Can confirm on 2.4.1.
The responsible code is here: https://github.com/ruby/ruby/blob/v2_4_1/lib/net/http.rb#L1468
I'm thinking of making a simple patch adding a boolean "#retry=".  Application or higher-level gems can then implement any retry logic...

----------------------------------------
Feature #10674: Net::HTTP retries idempotent requests once after a timeout, but its not configurable
https://bugs.ruby-lang.org/issues/10674#change-64806

* Author: jlecour (Jérémy Lecour)
* Status: Open
* Priority: Normal
* Assignee: drbrain (Eric Hodel)
* Target version: 
----------------------------------------
Hi,

I've noticed that Net::HTTP retries idempotent requests once after a time-out. It seems to adhere to the RFC 2616 (http://tools.ietf.org/html/rfc2616), but it is not always the best thing to do.

When you don't know exactly how a remote web service works, it may be wise to retry after a time-out.
But when you know that a retry won't change anything, it should be possible to disable this automatic retry. Otherwise, the server will have to deal with 2 requests (instead of 1) and the client will effectively time-out twice later than expected (time for the first and second time-out).

Having a basic "#retry=" (like we have "#read_timeout=" or "#open_timeout" would be good first step.
The value could be a simple boolean, or even an integer for the maximum number of retries.

The "Retry" middleware in Faraday has a more comprehensive feature set with max retries, exponential back-off, … : https://github.com/lostisland/faraday/blob/master/lib/faraday/request/retry.rb



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:82059] [Ruby trunk Feature#10674][Assigned] Net::HTTP retries idempotent requests once after a timeout, but its not configurable
       [not found] <redmine.issue-10674.20141229151053@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2017-05-14 11:51 ` [ruby-core:81154] [Ruby trunk Feature#10674] " cben
@ 2017-07-14  8:51 ` naruse
  3 siblings, 0 replies; 4+ messages in thread
From: naruse @ 2017-07-14  8:51 UTC (permalink / raw)
  To: ruby-core

Issue #10674 has been updated by naruse (Yui NARUSE).

Status changed from Open to Assigned
Assignee changed from drbrain (Eric Hodel) to naruse (Yui NARUSE)

----------------------------------------
Feature #10674: Net::HTTP retries idempotent requests once after a timeout, but its not configurable
https://bugs.ruby-lang.org/issues/10674#change-65790

* Author: jlecour (Jérémy Lecour)
* Status: Assigned
* Priority: Normal
* Assignee: naruse (Yui NARUSE)
* Target version: 
----------------------------------------
Hi,

I've noticed that Net::HTTP retries idempotent requests once after a time-out. It seems to adhere to the RFC 2616 (http://tools.ietf.org/html/rfc2616), but it is not always the best thing to do.

When you don't know exactly how a remote web service works, it may be wise to retry after a time-out.
But when you know that a retry won't change anything, it should be possible to disable this automatic retry. Otherwise, the server will have to deal with 2 requests (instead of 1) and the client will effectively time-out twice later than expected (time for the first and second time-out).

Having a basic "#retry=" (like we have "#read_timeout=" or "#open_timeout" would be good first step.
The value could be a simple boolean, or even an integer for the maximum number of retries.

The "Retry" middleware in Faraday has a more comprehensive feature set with max retries, exponential back-off, … : https://github.com/lostisland/faraday/blob/master/lib/faraday/request/retry.rb



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-14  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-10674.20141229151053@ruby-lang.org>
2014-12-29 15:10 ` [ruby-core:67206] [ruby-trunk - Feature #10674] [Open] Net::HTTP retries idempotent requests once after a timeout, but its not configurable jeremy.lecour
2015-11-20 21:42 ` [ruby-core:71614] [Ruby trunk - Feature #10674] " garett.shulman
2017-05-14 11:51 ` [ruby-core:81154] [Ruby trunk Feature#10674] " cben
2017-07-14  8:51 ` [ruby-core:82059] [Ruby trunk Feature#10674][Assigned] " naruse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).