Is there a way to retry S3 uploads?

100 views
Skip to first unread message

Trevor Turk

unread,
Dec 1, 2010, 1:28:05 PM12/1/10
to ruby-fog
I occasionally see spotty performance with Amazon's S3 service, and
I'm wondering if there's a built in way with Fog to do a "sleep and
retry 3 times" routine or something along those lines. I looked
briefly and didn't see anything. I don't expect there is anything, nor
am I sure such a feature would be a good idea to have, but I thought
it worth asking here for good measure.

Thanks!
- Trevor

geemus

unread,
Dec 1, 2010, 1:36:12 PM12/1/10
to ruby-fog
S3 can be spotty, I've definitely seen it as well. If you look
through the code base you may see an :idempotent option passed to
request in many cases (for instance on s3 file uploads). This tells
excon that if it gets back responses that don't match the expected
status code it should feel free to retry up to 3 times in order to
mitigate intermittent issues. It was actually added largely because
of s3 responding inconsistently, and it seems to do a good job of
making this transparent to the user. If you are still seeing issues
on some other commands its possible that there is still room for
improvement (or perhaps some more things should be flagged
idempotent). Its a little hard to sort all that out from just viewing
the code, but the actual usage of the idempotent flag can be see in
excon/lib/excon/connection I believe.

Trevor Turk

unread,
Dec 1, 2010, 1:38:26 PM12/1/10
to ruby-fog
On Dec 1, 6:36 pm, geemus <wbe...@engineyard.com> wrote:
> S3 can be spotty, I've definitely seen it as well.  If you look
> through the code base you may see an :idempotent option passed to
> request in many cases (for instance on s3 file uploads).  

Interesting! I'll take a closer look. Thanks for the reply!

- Trevor
Reply all
Reply to author
Forward
0 new messages