Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Cloud Storage: Add exponential backoff on server errors #2026

Merged
merged 1 commit into from
Nov 27, 2019

Conversation

gabrielreid
Copy link
Contributor

@gabrielreid gabrielreid commented Nov 21, 2019

Purpose

Brings the GCS implementation in line with the documented
expected behavior for dealing with HTTP 500 responses.

References

This PR resolves #1931

Ticket #1931 pointed to akka/akka#27461 as another potential resolution, but that ticket appears to have been discarded in the meantime.

Changes

  • Exponential backoff is now used for waits of up to 32 seconds on 500 responses returned from GCS, as specified in the GCS SLA.

@ennru
Copy link
Member

ennru commented Nov 25, 2019

Great!
As this provides Sources, the use of a RestartSource makes total sense.
Just for the record, the RetryFlow ended up in Akka 2.6.0 in its simpler form in akka/akka#27742

I wonder if this calls for introducing settings so that the back-off can be configured by the user.

@gabrielreid
Copy link
Contributor Author

I wonder if this calls for introducing settings so that the back-off can be configured by the user.

I was thinking about having these things in settings as well -- I decided against it (for now) because these specific timings are specified in the GCS SLA, so (in my view) they are part of the specification of the interface. I'm definitely open to another point of view on this though of course.

Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ennru ennru added this to the 2.0.0 milestone Nov 26, 2019
@ennru
Copy link
Member

ennru commented Nov 26, 2019

Oh, some trivial warnings make the build fail
https://travis-ci.com/akka/alpakka/jobs/258961188#L775

Brings the GCS implementation in line with the documented
expected behavior for dealing with HTTP 500 responses.
@gabrielreid
Copy link
Contributor Author

Oh, some trivial warnings make the build fail
https://travis-ci.com/akka/alpakka/jobs/258961188#L775

Oops, I guess the Travis build runs with some flags that I didn't use locally, sorry about that.

I've fixed the warnings (I believe) and pushed a new version.

@ennru ennru changed the title GCS: Add exponential backoff on server errors Google Cloud Storage: Add exponential backoff on server errors Nov 27, 2019
@ennru ennru merged commit 99031e0 into akka:master Nov 27, 2019
@ennru
Copy link
Member

ennru commented Nov 27, 2019

Thank you! A great improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add backoff mechanism for google-cloud-storage
2 participants